From: Mark A. Hershberger Date: Thu, 14 Jan 2010 05:02:24 +0000 (+0000) Subject: follow up r60832: Remove un-necessary test for stringiness since "" converts it. X-Git-Tag: 1.31.0-rc.0~38275 X-Git-Url: http://git.cyclocoop.org/%7B%24admin_url%7Dmembres/Category:Foo?a=commitdiff_plain;h=4a3fd45d478f70563d502cc6cc00b7551cac47f9;p=lhc%2Fweb%2Fwiklou.git follow up r60832: Remove un-necessary test for stringiness since "" converts it. --- 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" ); }