From cba3d83a930e9371cdfb5ab77cd585b6ec5d0216 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20Bundyra?= Date: Wed, 1 Dec 2021 12:47:49 +0000 Subject: [PATCH] fix: PHP 8.1 deprecation issue (#1205) laravel.WARNING: trim(): Passing null to parameter #1 ($string) of type string is deprecated in /srv/api/vendor/laravel/lumen-framework/src/Routing/Router.php on line 151 --- src/Routing/Router.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Routing/Router.php b/src/Routing/Router.php index 799d83853cbf..d92082ef04fc 100644 --- a/src/Routing/Router.php +++ b/src/Routing/Router.php @@ -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;