multiauth_tutorial icon indicating copy to clipboard operation
multiauth_tutorial copied to clipboard

$guard = array_get($exception->guards(), 0);

Open MuhammadAbeerAkmal opened this issue 6 years ago • 1 comments

I am facing the problem for this line $guard = array_get($exception->guards(), 0); when I use blog.test/home it gives this error Symfony\Component\Debug\Exception\FatalThrowableError Call to undefined function App\Exceptions\array_get()

what could be the problem and what's the solution?

MuhammadAbeerAkmal avatar Oct 11 '19 13:10 MuhammadAbeerAkmal

This is due to some Laravel versioning issues. I'm going to push an update to fix this issue, as I've already fixed this issue in many of my projects. Stay tuned!

I first need @jacurtis to allow me to push this hotfix.

Here is the minor change to fix this issue, prior to the update being released.

change the array_get() method to the following:

$guard = Arr::get($exception->guards(), 0);

Then make sure to include/use the Illuminate\Support\Arr class.

BippyMiester avatar Oct 15 '19 02:10 BippyMiester