From 629f800f51d0e492f25e115b0072caebf19aeb30 Mon Sep 17 00:00:00 2001 From: Sean Colombo Date: Thu, 29 Sep 2011 23:11:31 +0000 Subject: [PATCH] Revision::newFromTitle() returns null sometimes. Protect against the errors. --- includes/Title.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/includes/Title.php b/includes/Title.php index b31b87eceb..4868761885 100644 --- a/includes/Title.php +++ b/includes/Title.php @@ -3575,6 +3575,9 @@ class Title { } # Get the article text $rev = Revision::newFromTitle( $nt ); + if( !is_object( $rev ) ){ + return false; + } $text = $rev->getText(); # Does the redirect point to the source? # Or is it a broken self-redirect, usually caused by namespace collisions? -- 2.20.1