From aeb551b317df75daa79d5f3c341cc0e4b8720e64 Mon Sep 17 00:00:00 2001 From: Anton <31804440+rdstonech@users.noreply.github.com> Date: Sat, 9 Jun 2018 16:15:50 +0300 Subject: [PATCH] Remove double use of spl_object_hash (#2226) --- src/pocketmine/inventory/transaction/InventoryTransaction.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/pocketmine/inventory/transaction/InventoryTransaction.php b/src/pocketmine/inventory/transaction/InventoryTransaction.php index b44f1a5de..91103f20e 100644 --- a/src/pocketmine/inventory/transaction/InventoryTransaction.php +++ b/src/pocketmine/inventory/transaction/InventoryTransaction.php @@ -82,7 +82,7 @@ class InventoryTransaction{ */ public function addAction(InventoryAction $action) : void{ if(!isset($this->actions[$hash = spl_object_hash($action)])){ - $this->actions[spl_object_hash($action)] = $action; + $this->actions[$hash] = $action; $action->onAddToTransaction($this); }else{ throw new \InvalidArgumentException("Tried to add the same action to a transaction twice");