From ad87c11ae1157529e159cdcce239b712b420d9be Mon Sep 17 00:00:00 2001 From: "Dylan K. Taylor" Date: Wed, 5 Feb 2020 16:36:11 +0000 Subject: [PATCH] ThreadManager: use array-access instead of variable property access --- src/pocketmine/ThreadManager.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/pocketmine/ThreadManager.php b/src/pocketmine/ThreadManager.php index b84f6509a5..4d232c3fa6 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)]); } }