Remove double use of spl_object_hash (#2226)

This commit is contained in:
Anton 2018-06-09 16:15:50 +03:00 committed by Dylan K. Taylor
parent 37b445f210
commit aeb551b317

View File

@ -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");