User: Don't fail mysteriously when passing a User object to idFromName()
authorRoan Kattouw <roan.kattouw@gmail.com>
Wed, 31 Oct 2018 22:38:07 +0000 (15:38 -0700)
committerRoan Kattouw <roan.kattouw@gmail.com>
Wed, 31 Oct 2018 22:38:07 +0000 (15:38 -0700)
commit614dceed00bea7268bc3a2ddcd776e693ddb4b4d
treebc828067b9a53b038be06b57ce551611513a9b06
parentc16704c33a278b729c11922916445b41ce05253b
User: Don't fail mysteriously when passing a User object to idFromName()

If $name is a User object, some code magically works because the object
gets converted to a string, but other code blows up because objects
aren't valid array keys. Prevent this from happening by explicitly
forcing $name to be a string.

Bug: T208469
Change-Id: Icc9ebec93d18609605e2633ccd23b90478e05e51
includes/user/User.php