Skip to content

Commit 443ac0e

Browse files
committed
Use PHP 8.4 polyfill for mb_trim PHP function
1 parent f16f361 commit 443ac0e

2 files changed

Lines changed: 3 additions & 2 deletions

File tree

composer.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
],
1212
"require": {
1313
"php": "^8.2",
14+
"symfony/polyfill-php84": "^1.33",
1415
"netgen/openapi": "^1.0.2",
1516
"netgen/layouts-core": "^1.4.11",
1617
"netgen/layouts-ibexa": "^1.4",

lib/Ibexa/UrlAliasLocationResolver.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,8 @@
1111
use Netgen\IbexaSiteApi\API\LoadService;
1212
use Netgen\IbexaSiteApi\API\Values\Location;
1313

14+
use function mb_trim;
1415
use function sprintf;
15-
use function trim;
1616

1717
final class UrlAliasLocationResolver
1818
{
@@ -25,7 +25,7 @@ public function __construct(
2525

2626
public function resolveLocation(string $path): Location
2727
{
28-
$urlAlias = $this->getUrlAlias(sprintf('/%s', trim($path, '/')));
28+
$urlAlias = $this->getUrlAlias(sprintf('/%s', mb_trim($path, '/')));
2929

3030
if ($urlAlias->type === URLAlias::LOCATION) {
3131
return $this->loadService->loadLocation($urlAlias->destination);

0 commit comments

Comments
 (0)