From 4a3fd45d478f70563d502cc6cc00b7551cac47f9 Mon Sep 17 00:00:00 2001 From: "Mark A. Hershberger" Date: Thu, 14 Jan 2010 05:02:24 +0000 Subject: [PATCH] follow up r60832: Remove un-necessary test for stringiness since "" converts it. --- includes/parser/Parser.php | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/includes/parser/Parser.php b/includes/parser/Parser.php index 39cbed4f5d..dea1cda66f 100644 --- a/includes/parser/Parser.php +++ b/includes/parser/Parser.php @@ -258,11 +258,12 @@ class Parser * Set the context title */ function setTitle( $t ) { + // If don't have a Title object, then convert what we have to + // a string and then to Title. If you pass in an object, make + // sure it has a __toString() method or you'll get a + // "Catchable fatal error" if ( $t && !($t instanceOf FakeTitle) - && !($t instanceOf Title) - && is_string( "$t" ) ) { - // If don't have a Title object, make sure we can convert - // whatever we've been passed to a string. + && !($t instanceOf Title) ) { $t = Title::newFromText( "$t" ); } -- 2.20.1