From: Victor Vasiliev Date: Tue, 12 Feb 2008 18:50:42 +0000 (+0000) Subject: Fixing fatal error on invalid usernames. X-Git-Tag: 1.31.0-rc.0~49513 X-Git-Url: http://git.cyclocoop.org/%24action?a=commitdiff_plain;h=ff98cdd4f295947ffbb7ef220ac6d2de716bc0ad;p=lhc%2Fweb%2Fwiklou.git Fixing fatal error on invalid usernames. --- diff --git a/includes/SpecialBlockip.php b/includes/SpecialBlockip.php index 29fc1d646c..f2c5f7c9c0 100644 --- a/includes/SpecialBlockip.php +++ b/includes/SpecialBlockip.php @@ -299,7 +299,7 @@ class IPBlockForm { $userId = $user->getID(); $this->BlockAddress = $user->getName(); } else { - return array('nosuchusershort', htmlspecialchars($user->getName())); + return array('nosuchusershort', htmlspecialchars( $user ? $user->getName() : $this->BlockAddress ) ); } } else { return array('badipaddress');