Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug]: get_class(): Argument #1 ($object) must be of type object, null given #170

Open
TonsiTT opened this issue Jan 7, 2025 · 0 comments
Assignees
Labels

Comments

@TonsiTT
Copy link

TonsiTT commented Jan 7, 2025

Extension Version

v0.1.14

PHP Binary

Docker

Operating System

Linux

What happened?

  get_class(): Argument #1 ($object) must be of type object, null given

  at vendor/_laravel_ide/discover-8118b18bfca517f92f5798dc18717d4e.php:37
     33▕         $reflection = new \ReflectionFunction($policy);
     34▕ 
     35▕         $policyClass = null;
     36▕ 
  ➜  37▕         if (get_class($reflection->getClosureThis()) === \Illuminate\Auth\Access\Gate::class) {
     38▕             $vars = $reflection->getClosureUsedVariables();
     39▕ 
     40▕             if (isset($vars['callback'])) {
     41▕                 [$policyClass, $method] = explode('@', $vars['callback']);

  1   [internal]:0

Mimimal Code Sample

No response

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants