diff --git a/src/pocketmine/ThreadManager.php b/src/pocketmine/ThreadManager.php index b84f6509a..4d232c3fa 100644 --- a/src/pocketmine/ThreadManager.php +++ b/src/pocketmine/ThreadManager.php @@ -52,7 +52,7 @@ class ThreadManager extends \Volatile{ */ public function add($thread){ if($thread instanceof Thread or $thread instanceof Worker){ - $this->{spl_object_hash($thread)} = $thread; + $this[spl_object_hash($thread)] = $thread; } } @@ -63,7 +63,7 @@ class ThreadManager extends \Volatile{ */ public function remove($thread){ if($thread instanceof Thread or $thread instanceof Worker){ - unset($this->{spl_object_hash($thread)}); + unset($this[spl_object_hash($thread)]); } }