mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-09-06 09:56:06 +00:00
Added explicit AsyncTask->storeLocal(), removed AsyncTask->__construct() object storage (#1322)
Far too often I see people using IDEs which generate the constructors for them and then accidentally unintentionally store things in the object store. This parent constructor behaviour is unexpected. If a developer wants to store something, they should now do so explicitly by calling storeLocal().
This commit is contained in:
@ -46,7 +46,7 @@ class BulkCurlTask extends AsyncTask{
|
||||
* @param mixed|null $complexData
|
||||
*/
|
||||
public function __construct(array $operations, $complexData = null){
|
||||
parent::__construct($complexData);
|
||||
$this->storeLocal($complexData);
|
||||
$this->operations = serialize($operations);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user