From: Alexandre Emsenhuber Date: Thu, 3 Jan 2013 10:53:41 +0000 (+0100) Subject: Block::parseTarget() accepts and can return null X-Git-Tag: 1.31.0-rc.0~21144^2 X-Git-Url: http://git.cyclocoop.org/fichier?a=commitdiff_plain;h=d4716689d1af01e9c78227ef658299f30c16fbf6;p=lhc%2Fweb%2Fwiklou.git Block::parseTarget() accepts and can return null Documentation currently omits this. Change-Id: I183121e5134c1bbd53a613780d171b52737f071d --- diff --git a/includes/Block.php b/includes/Block.php index 4c878b6129..5f9be3099c 100644 --- a/includes/Block.php +++ b/includes/Block.php @@ -1066,12 +1066,13 @@ class Block { } /** - * From an existing Block, get the target and the type of target. Note that it is - * always safe to treat the target as a string; for User objects this will return - * User::__toString() which in turn gives User::getName(). + * From an existing Block, get the target and the type of target. + * Note that, except for null, it is always safe to treat the target + * as a string; for User objects this will return User::__toString() + * which in turn gives User::getName(). * - * @param $target String|Int|User - * @return array( User|String, Block::TYPE_ constant ) + * @param $target String|Int|User|null + * @return array( User|String|null, Block::TYPE_ constant|null ) */ public static function parseTarget( $target ) { # We may have been through this before