From: Aryeh Gregor Date: Fri, 23 Feb 2007 04:45:23 +0000 (+0000) Subject: Check whether the username passed to makeTalkUrlDetails is valid to give a clearer... X-Git-Tag: 1.31.0-rc.0~53971 X-Git-Url: http://git.cyclocoop.org/%22.%24h.%22?a=commitdiff_plain;h=f8509539d057765eaef8fcc32b35a8238d2bca73;p=lhc%2Fweb%2Fwiklou.git Check whether the username passed to makeTalkUrlDetails is valid to give a clearer error message (can screw up with IPv6) --- diff --git a/includes/SkinTemplate.php b/includes/SkinTemplate.php index 382ac1f4bf..7c4cf12d44 100644 --- a/includes/SkinTemplate.php +++ b/includes/SkinTemplate.php @@ -598,6 +598,9 @@ class SkinTemplate extends Skin { function makeTalkUrlDetails( $name, $urlaction = '' ) { $title = Title::newFromText( $name ); + if( !is_object($title) ) { + throw new MWException( __METHOD__." given invalid pagename $name" ); + } $title = $title->getTalkPage(); self::checkTitle( $title, $name ); return array(