Skip to content

Commit ae5926f

Browse files
carlbennettclaude
andcommitted
Fix sanitizeForUrl array handling for lowercase step
strtolower does not accept arrays; use array_map when result is an array, consistent with the array_walk fix for the trim step. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
1 parent 070233c commit ae5926f

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/Libraries/Core/StringProcessor.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ public static function sanitizeForUrl(array|string $haystack, bool $lowercase =
4343
{
4444
\array_walk($result, fn(&$v) => $v = \trim($v, '-'));
4545
}
46-
if ($lowercase) $result = \strtolower($result);
46+
if ($lowercase) $result = \is_array($result) ? \array_map('\strtolower', $result) : \strtolower($result);
4747
return $result;
4848
}
4949

0 commit comments

Comments
 (0)