lavary/laravel-menu

Passing null to parameter #1 ($string) of type string is deprecated .. Menu/Builder.php on line 303 (LF 10 / PHP 8.1)

Closed this issue · 2 comments

In Laravel 10/PHP 8.1
LOG.warning: trim(): Passing null to parameter #1 ($string) of type string is deprecated in /var/www/foo/vendor/lavary/laravel-menu/src/Lavary/Menu/Builder.php on line 303

problematic part of code in PHP 8.1:
trim(trim(Arr::get($old, 'class')).' '.trim(Arr::get($new, 'class')));

It is fixed but only on the master branch.

"lavary/laravel-menu": "dev-master"