Index: trunk/phase3/includes/Article.php |
— | — | @@ -970,9 +970,9 @@ |
971 | 971 | # Only diffs and new page links from RC give rcid params, so if |
972 | 972 | # we are just viewing the page normally with no rcid, try to find it. |
973 | 973 | # This is more convenient for users. |
974 | | - if( empty($rcid) && $this->mTitle->userCan('patrol') ) { |
| 974 | + if( empty($rcid) && $this->mTitle->exists() && $this->mTitle->userCan('patrol') ) { |
975 | 975 | $firstRev = $this->mTitle->getFirstRevision(); |
976 | | - $rcid = $firstRev->isUnpatrolled(); |
| 976 | + $rcid = $firstRev ? $firstRev->isUnpatrolled() : 0; |
977 | 977 | } |
978 | 978 | # If we have been passed an &rcid= parameter, we want to give the user a |
979 | 979 | # chance to mark this new article as patrolled. |