Skip to content

Commit

Permalink
fix: PHP 8.1 deprecation issue (laravel#1205)
Browse files Browse the repository at this point in the history
laravel.WARNING: trim(): Passing null to parameter laravel#1 ($string) of type string is deprecated in /srv/api/vendor/laravel/lumen-framework/src/Routing/Router.php on line 151
  • Loading branch information
michalbundyra authored Dec 1, 2021
1 parent d386755 commit cba3d83
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Routing/Router.php
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ protected static function formatGroupPrefix($new, $old)
$oldPrefix = $old['prefix'] ?? null;

if (isset($new['prefix'])) {
return trim($oldPrefix, '/').'/'.trim($new['prefix'], '/');
return trim($oldPrefix ?? '', '/').'/'.trim($new['prefix'], '/');
}

return $oldPrefix;
Expand Down

0 comments on commit cba3d83

Please sign in to comment.