1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-07-31 14:00:31 +02:00

[ticket/17281] Fix return type and ensure type correctness

PHPBB3-17281
This commit is contained in:
Marc Alexander
2023-12-30 20:58:54 +01:00
parent 5d53089651
commit e42b743b86

View File

@@ -190,7 +190,7 @@ class manager
* @param array $row User data or group data
* @param string $prefix Prefix of data keys (e.g. user), should not include the trailing underscore
*
* @return array{string, string} User or group data with keys that have been
* @return array User or group data with keys that have been
* stripped from the preceding "user_" or "group_"
* Also the group id is prefixed with g, when the prefix group is removed.
*/
@@ -205,7 +205,7 @@ class manager
$output = [];
foreach ($row as $key => $value)
{
$key = preg_replace("#^(?:{$prefix}_)#", '', $key);
$key = preg_replace("#^(?:{$prefix}_)#", '', (string) $key);
$output[$key] = $value;
}