Skip to content
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Fix: Undefined str_is function
Replace deprecated str_is with Str::is
  • Loading branch information
allayGerald committed Feb 12, 2021
commit 672c2f0befdbd0a45839ecec88200d662f0d2bcd
3 changes: 2 additions & 1 deletion src/Entrust/Traits/EntrustUserTrait.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
use Illuminate\Support\Facades\Cache;
use Illuminate\Support\Facades\Config;
use InvalidArgumentException;
use Illuminate\Support\Str;

trait EntrustUserTrait
{
Expand Down Expand Up @@ -162,7 +163,7 @@ public function can($permission, $requireAll = false)
foreach ($this->cachedRoles() as $role) {
// Validate against the Permission table
foreach ($role->cachedPermissions() as $perm) {
if (str_is( $permission, $perm->name) ) {
if (Str::is( $permission, $perm->name) ) {
return true;
}
}
Expand Down