From 78fd3f53a9c5405fa349f5e07153fed629ad0165 Mon Sep 17 00:00:00 2001 From: Brion Vibber Date: Sat, 18 Feb 2006 19:41:01 +0000 Subject: [PATCH] * More exact checking in Title::equals() to fox moves of numerically similar page titles. (Odd hex title bug on 64-bit.) --- RELEASE-NOTES | 2 ++ includes/Title.php | 5 +++-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/RELEASE-NOTES b/RELEASE-NOTES index e99b6ea325..fbf732bdda 100644 --- a/RELEASE-NOTES +++ b/RELEASE-NOTES @@ -636,6 +636,8 @@ fully support the editing toolbar, but was found to be too confusing. * Remove legacy PHPTal code, hasn't been maintained in ages. * Tweak Userlogin include order for APC issue * Don't try to link to current page on protection tab +* More exact checking in Title::equals() to fox moves of numerically similar + page titles. (Odd hex title bug on 64-bit.) === Caveats === diff --git a/includes/Title.php b/includes/Title.php index 2c1932529a..d65176e4ba 100644 --- a/includes/Title.php +++ b/includes/Title.php @@ -2088,9 +2088,10 @@ class Title { * @return bool */ function equals( $title ) { - return $this->getInterwiki() == $title->getInterwiki() + // Note: === is necessary for proper matching of number-like titles. + return $this->getInterwiki() === $title->getInterwiki() && $this->getNamespace() == $title->getNamespace() - && $this->getDbkey() == $title->getDbkey(); + && $this->getDbkey() === $title->getDbkey(); } /** -- 2.20.1