Ad

ERROR, Call To A Member Function Send() On Null

- 1 answer

The font-end of my october CMS instance suddenly started giving me out the following error code:

Call to a member function send() on null

$kernel = $app->make('Illuminate\Contracts\Http\Kernel');

$response = $kernel->handle(
    $request = Illuminate\Http\Request::capture()
);

$response->send();

$kernel->terminate($request, $response);

Any Idea what could be causing it? I probably was adding a translation for another language while this happened.

I tried to find other posts about similar problems, but there seem to be so many cause for this error and I'm not a programmer. Thank you!

screenshot of error code, visiting the front-end

Ad

Answer

Most probable reason is that you're using a custom middleware that has a case where it doesn't return $next($request) or anything, which will return null instead of a response.

Ad
source: stackoverflow.com
Ad