From 00581168e107c76f848d5d2d07b087157e40d0c0 Mon Sep 17 00:00:00 2001 From: Siebrand Mazeland Date: Fri, 18 Mar 2016 14:23:40 +0100 Subject: [PATCH] Ensure that User::getId() returns int And document User::mId as such. Change-Id: I65a5a284257da50830675f074f890f27701900e0 --- includes/user/User.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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; } /** -- 2.20.1