Skip to content

array_find_key(): Argument #1 ($array) must be of type array #3035

@rim89

Description

@rim89

Describe the bug
After last release Laravel (12.23.1) I get a bug, when I call inRole method

array_find_key(): Argument #1 ($array) must be of type array, Illuminate\Database\Eloquent\Collection given, called in /var/www/html/vendor/laravel/framework/src/Illuminate/Collections/Arr.php on line 266

Maybe probles with func array_find_key in vendor/symfony/polyfill-php84/bootstrap.php and my php version PHP 8.3

To Reproduce

Call Auth::user()->inRole('role-name');

Server (please complete the following information):

  • Platfrom Version: 14.52.3
  • Laravel Version: 12.23.1
  • PHP Version: 8.3.19
  • Database: MySql
  • Database Version: 8.0.40-1.el9

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions