From a71d06411a2cd5c77af4709875aa6ed7fd9900b3 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Niklas=20Laxstr=C3=B6m?= Date: Mon, 28 Jun 2010 12:02:09 +0000 Subject: [PATCH] One place forgot intval() mLatestID causing bugs with strict comparisons. Fixed it and added extra intval() conversion. --- includes/Title.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/includes/Title.php b/includes/Title.php index d20bc24ada..bba078d3d1 100644 --- a/includes/Title.php +++ b/includes/Title.php @@ -240,7 +240,7 @@ class Title { $t->mArticleID = isset( $row->page_id ) ? intval( $row->page_id ) : -1; $t->mLength = isset( $row->page_len ) ? intval( $row->page_len ) : -1; $t->mRedirect = isset( $row->page_is_redirect ) ? (bool)$row->page_is_redirect : null; - $t->mLatestID = isset( $row->page_latest ) ? $row->page_latest : false; + $t->mLatestID = isset( $row->page_latest ) ? intval( $row->page_latest ) : false; return $t; } @@ -2330,7 +2330,7 @@ class Title { */ public function getLatestRevID( $flags = 0 ) { if ( $this->mLatestID !== false ) - return $this->mLatestID; + return intval( $this->mLatestID ); # Calling getArticleID() loads the field from cache as needed if ( !$this->getArticleID( $flags ) ) { return $this->mLatestID = 0; -- 2.20.1