You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Not sure if this is a problem with Laratrust or Str::contains, but when I use the middleware like this in the constructor:
public function __construct()
{
$this->middleware('permission:admin.index');
}
I get this warning: str_contains(): Passing null to parameter #1 ($haystack) of type string is deprecated in my_app_path/vendor/laravel/framework/src/Illuminate/Support/Str.php on line 269
To see the warning I used LOG_DEPRECATIONS_CHANNEL=single in the environment.
This warning happens in the function GetValuesFromParameter at LaratrustMiddleware.php when $team is null.
I tested locally changing the line to Str::contains($team ?? '', ['require_all', 'guard:']) ? null : $team and it removes the warning, but I'm not sure if this is the correct solution.
I'm using Laratrust 8.2.1 and Laravel v10.28.0
The text was updated successfully, but these errors were encountered:
Not sure if this is a problem with Laratrust or Str::contains, but when I use the middleware like this in the constructor:
I get this warning:
str_contains(): Passing null to parameter #1 ($haystack) of type string is deprecated in my_app_path/vendor/laravel/framework/src/Illuminate/Support/Str.php on line 269
To see the warning I used
LOG_DEPRECATIONS_CHANNEL=single
in the environment.This warning happens in the function GetValuesFromParameter at LaratrustMiddleware.php when
$team
is null.laratrust/src/Middleware/LaratrustMiddleware.php
Line 66 in 1b6fe4d
I tested locally changing the line to
Str::contains($team ?? '', ['require_all', 'guard:']) ? null : $team
and it removes the warning, but I'm not sure if this is the correct solution.I'm using Laratrust 8.2.1 and Laravel v10.28.0
The text was updated successfully, but these errors were encountered: