Avoid type mismatch causing 'Not an integer'

This commit is contained in:
Nathan Gray 2016-03-25 16:22:06 +00:00
parent a81cdf73be
commit 2d26d595b6

View File

@ -498,7 +498,7 @@ class Accounts
*/
static function username($account_id=null)
{
if ($account_id && !($account = self::cache_read($account_id)))
if ($account_id && !($account = self::cache_read((int)$account_id)))
{
return '#'.$account_id;
}