The user_id is an unsigned integer in the database. But not all database
abstractions we use are guaranteed to return integer values as PHP
integers. Sometimes it's a string and needs an integer cast first.
Want proof? Search for usages of this method. Almost all add an (int)
cast. This is weird and should not be necessary.
Change-Id: If1d706f73350fca5b3a0f1e0de59e4518162445b
if ( $s === false ) {
$result = null;
} else {
- $result = $s->user_id;
+ $result = (int)$s->user_id;
}
self::$idCacheByName[$name] = $result;