Jeroen De Dauw has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/69296


Change subject: Get rid of getPrefixedId in EntityContent::equals and added 
missing check
......................................................................

Get rid of getPrefixedId in EntityContent::equals and added missing check

Change-Id: I70f7a4f61c2c8236c8cd201c6aa1938b3def18f0
---
M repo/includes/content/EntityContent.php
1 file changed, 5 insertions(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Wikibase 
refs/changes/96/69296/1

diff --git a/repo/includes/content/EntityContent.php 
b/repo/includes/content/EntityContent.php
index da1d2df..df1459e 100644
--- a/repo/includes/content/EntityContent.php
+++ b/repo/includes/content/EntityContent.php
@@ -253,11 +253,15 @@
                        return false;
                }
 
+               if ( !( $that instanceof EntityContent ) ) {
+                       return false;
+               }
+
                $thisEntity = $this->getEntity();
                $thatEntity = $that->getEntity();
 
                if ( !$this->isNew() && !$that->isNew()
-                       && $thisEntity->getPrefixedId() !== 
$thatEntity->getPrefixedId()
+                       && $thisEntity->getId()->equals( $thatEntity->getId() )
                ) {
                        return false;
                }

-- 
To view, visit https://gerrit.wikimedia.org/r/69296
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I70f7a4f61c2c8236c8cd201c6aa1938b3def18f0
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Wikibase
Gerrit-Branch: master
Gerrit-Owner: Jeroen De Dauw <jeroended...@gmail.com>

_______________________________________________
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to