Support the ongoing development of Laravel.io →
posted 9 years ago
Views

I am trying to display custom views on errors. I have already modified the code in global.php as below:

App::error(function(Exception $exception, $code)
{
	Log::error($exception);
        return Response::view('error', $code);
});

But I am getting the error Error in exception handler: Illegal offset type in isset or empty in /my/server/path/vendor/laravel/framework/src/Illuminate/View/Factory.php:122

The code in Factory.php on line 122 is:

if (isset($this->aliases[$view])) $view = $this->aliases[$view];

What can I do to solve this issue?

Last updated 2 years ago.
0

Isn't there anyone who can help on this issue?

0

Sign in to participate in this thread!

Eventy

Your banner here too?

toorta toorta Joined 27 Aug 2014

Moderators

We'd like to thank these amazing companies for supporting us

Your logo here?

Laravel.io

The Laravel portal for problem solving, knowledge sharing and community building.

© 2025 Laravel.io - All rights reserved.