From: Siebrand Mazeland Date: Fri, 18 Mar 2016 13:23:40 +0000 (+0100) Subject: Ensure that User::getId() returns int X-Git-Tag: 1.31.0-rc.0~7542^2 X-Git-Url: http://git.cyclocoop.org/%7B%24www_url%7Dadmin/compta/operations/?a=commitdiff_plain;h=00581168e107c76f848d5d2d07b087157e40d0c0;p=lhc%2Fweb%2Fwiklou.git Ensure that User::getId() returns int And document User::mId as such. Change-Id: I65a5a284257da50830675f074f890f27701900e0 --- diff --git a/includes/user/User.php b/includes/user/User.php index 09124bfd61..3a891f62fc 100644 --- a/includes/user/User.php +++ b/includes/user/User.php @@ -200,6 +200,7 @@ class User implements IDBAccessObject { /** Cache variables */ // @{ + /** @var int */ public $mId; /** @var string */ public $mName; @@ -2052,7 +2053,8 @@ class User implements IDBAccessObject { // Don't load if this was initialized from an ID $this->load(); } - return $this->mId; + + return (int)$this->mId; } /**