From 5feff7987541394f6b840aa03a8625c3e30bf27c Mon Sep 17 00:00:00 2001 From: "Dylan K. Taylor" Date: Wed, 21 Dec 2016 15:00:00 +0000 Subject: [PATCH] Fix deepEquals() crash when tag check is specified and only one item has a tag (#188) --- src/pocketmine/item/Item.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/pocketmine/item/Item.php b/src/pocketmine/item/Item.php index fe9fdfed4..37efa60ae 100644 --- a/src/pocketmine/item/Item.php +++ b/src/pocketmine/item/Item.php @@ -757,7 +757,7 @@ class Item implements ItemIds, \JsonSerializable{ public final function deepEquals(Item $item, bool $checkDamage = true, bool $checkCompound = true) : bool{ if($this->equals($item, $checkDamage, $checkCompound)){ return true; - }elseif($item->hasCompoundTag() or $this->hasCompoundTag()){ + }elseif($item->hasCompoundTag() and $this->hasCompoundTag()){ return NBT::matchTree($this->getNamedTag(), $item->getNamedTag()); }