From e42b743b863d2213923c808c554c5cdd0805dbe8 Mon Sep 17 00:00:00 2001 From: Marc Alexander Date: Sat, 30 Dec 2023 20:58:54 +0100 Subject: [PATCH] [ticket/17281] Fix return type and ensure type correctness PHPBB3-17281 --- phpBB/phpbb/avatar/manager.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/phpBB/phpbb/avatar/manager.php b/phpBB/phpbb/avatar/manager.php index 18b198caa7..f4fc16ab52 100644 --- a/phpBB/phpbb/avatar/manager.php +++ b/phpBB/phpbb/avatar/manager.php @@ -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; }