From e823a7e0c4a1cf19ad5a629be223acf3aea090e5 Mon Sep 17 00:00:00 2001 From: Aaron Schulz Date: Fri, 16 Jan 2009 13:23:23 +0000 Subject: [PATCH] Tweak r45778, check exists() --- includes/Article.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/includes/Article.php b/includes/Article.php index 8058eadc6e..3e413cadc3 100644 --- a/includes/Article.php +++ b/includes/Article.php @@ -970,9 +970,9 @@ class Article { # Only diffs and new page links from RC give rcid params, so if # we are just viewing the page normally with no rcid, try to find it. # This is more convenient for users. - if( empty($rcid) && $this->mTitle->userCan('patrol') ) { + if( empty($rcid) && $this->mTitle->exists() && $this->mTitle->userCan('patrol') ) { $firstRev = $this->mTitle->getFirstRevision(); - $rcid = $firstRev->isUnpatrolled(); + $rcid = $firstRev ? $firstRev->isUnpatrolled() : 0; } # If we have been passed an &rcid= parameter, we want to give the user a # chance to mark this new article as patrolled. -- 2.20.1