0

I suddenly started getting this error:

ErrorException in c692833c6b3f4dbc2c2d680d56c249ad8685acc2.php line 16:
Trying to get property of non-object (View: /var/www/html/sudoman281.cz/blog/resources/views/home.blade.php)
in c692833c6b3f4dbc2c2d680d56c249ad8685acc2.php line 16
at CompilerEngine->handleViewException(object(ErrorException), '1') in PhpEngine.php line 44
at PhpEngine->evaluatePath('/var/www/html/sudoman281.cz/blog/storage/framework/views/c692833c6b3f4dbc2c2d680d56c249ad8685acc2.php', array('__env' => object(Factory), 'app' => object(Application), 'errors' => object(ViewErrorBag))) in CompilerEngine.php line 59
at CompilerEngine->get('/var/www/html/sudoman281.cz/blog/resources/views/home.blade.php', array('__env' => object(Factory), 'app' => object(Application), 'errors' => object(ViewErrorBag))) in View.php line 147
at View->getContents() in View.php line 118
at View->renderContents() in View.php line 83
at View->render() in Response.php line 53
at Response->setContent(object(View)) in Response.php line 199
at Response->__construct(object(View)) in Router.php line 1030
at Router->prepareResponse(object(Request), object(View)) in Router.php line 704
at Router->Illuminate\Routing\{closure}(object(Request))
at call_user_func(object(Closure), object(Request)) in Pipeline.php line 52
at Pipeline->Illuminate\Routing\{closure}(object(Request)) in VerifyCsrfToken.php line 64
at VerifyCsrfToken->handle(object(Request), object(Closure))
at call_user_func_array(array(object(VerifyCsrfToken), 'handle'), array(object(Request), object(Closure))) in Pipeline.php line 124
at Pipeline->Illuminate\Pipeline\{closure}(object(Request))
at call_user_func(object(Closure), object(Request)) in Pipeline.php line 32
at Pipeline->Illuminate\Routing\{closure}(object(Request)) in ShareErrorsFromSession.php line 49
at ShareErrorsFromSession->handle(object(Request), object(Closure))
at call_user_func_array(array(object(ShareErrorsFromSession), 'handle'), array(object(Request), object(Closure))) in Pipeline.php line 124
at Pipeline->Illuminate\Pipeline\{closure}(object(Request))
at call_user_func(object(Closure), object(Request)) in Pipeline.php line 32
at Pipeline->Illuminate\Routing\{closure}(object(Request)) in StartSession.php line 62
at StartSession->handle(object(Request), object(Closure))
at call_user_func_array(array(object(StartSession), 'handle'), array(object(Request), object(Closure))) in Pipeline.php line 124
at Pipeline->Illuminate\Pipeline\{closure}(object(Request))
at call_user_func(object(Closure), object(Request)) in Pipeline.php line 32
at Pipeline->Illuminate\Routing\{closure}(object(Request)) in AddQueuedCookiesToResponse.php line 37
at AddQueuedCookiesToResponse->handle(object(Request), object(Closure))
at call_user_func_array(array(object(AddQueuedCookiesToResponse), 'handle'), array(object(Request), object(Closure))) in Pipeline.php line 124
at Pipeline->Illuminate\Pipeline\{closure}(object(Request))
at call_user_func(object(Closure), object(Request)) in Pipeline.php line 32
at Pipeline->Illuminate\Routing\{closure}(object(Request)) in EncryptCookies.php line 59
at EncryptCookies->handle(object(Request), object(Closure))
at call_user_func_array(array(object(EncryptCookies), 'handle'), array(object(Request), object(Closure))) in Pipeline.php line 124
at Pipeline->Illuminate\Pipeline\{closure}(object(Request))
at call_user_func(object(Closure), object(Request)) in Pipeline.php line 32
at Pipeline->Illuminate\Routing\{closure}(object(Request))
at call_user_func(object(Closure), object(Request)) in Pipeline.php line 103
at Pipeline->then(object(Closure)) in Router.php line 705
at Router->runRouteWithinStack(object(Route), object(Request)) in Router.php line 678
at Router->dispatchToRoute(object(Request)) in Router.php line 654
at Router->dispatch(object(Request)) in Kernel.php line 246
at Kernel->Illuminate\Foundation\Http\{closure}(object(Request))
at call_user_func(object(Closure), object(Request)) in Pipeline.php line 52
at Pipeline->Illuminate\Routing\{closure}(object(Request)) in CheckForMaintenanceMode.php line 44
at CheckForMaintenanceMode->handle(object(Request), object(Closure))
at call_user_func_array(array(object(CheckForMaintenanceMode), 'handle'), array(object(Request), object(Closure))) in Pipeline.php line 124
at Pipeline->Illuminate\Pipeline\{closure}(object(Request))
at call_user_func(object(Closure), object(Request)) in Pipeline.php line 32
at Pipeline->Illuminate\Routing\{closure}(object(Request))
at call_user_func(object(Closure), object(Request)) in Pipeline.php line 103
at Pipeline->then(object(Closure)) in Kernel.php line 132
at Kernel->sendRequestThroughRouter(object(Request)) in Kernel.php line 99
at Kernel->handle(object(Request)) in index.php line 54

Where is the problem on my server or Laravel? I don't know, what could trigger this, but i did not do anything. Do you know where might be a problem? The project is programmed in Laravel 5.0.

3
  • recompile your code it will remove error Commented Mar 3, 2016 at 14:50
  • Could you please post the code around line 16 from the file in question. Its going to be in storage/framework/views if you are using L5.
    – DavidT
    Commented Mar 3, 2016 at 15:05
  • It may also be useful to post the code from the method that is being used in the controller that loads that page
    – DavidT
    Commented Mar 3, 2016 at 15:13

2 Answers 2

0
/var/www/html/sudoman281.cz/blog/storage/framework/views/c692833c6b3f4dbc2c2d680d56c249ad8685acc2.php

That's a compiled view file.

You can probably open it up and take a look at line 16 and get an idea of what's wrong. (My guess would be you're not passing an object to the view that the view is expecting).

1
  • There is a problem... File with this name doesn't exist.
    – xtrontross
    Commented Mar 3, 2016 at 19:20
0

There error is coming from your home.blade.php file. There is a cached version of that view file in your storage/framework/views folder with the filename "c692833c6b3f4dbc2c2d680d56c249ad8685acc2.php" and you can see the error on line 16 of that cached view.

It looks like you are trying to reference a property on an object. But that property does not exist. (For example: you are looping through users and trying to access $user->email and this $user doesn't have an email property for some reason)

3
  • 2
    The error is "Trying to get property of non object" which means in your example the error would be caused by $user not being an object, could be an array or string or anything other than an object. Not that email is not a property of it.
    – DavidT
    Commented Mar 3, 2016 at 15:03
  • Yeah, my bad. Sorry for the sloppy example.
    – Landjea
    Commented Mar 3, 2016 at 15:33
  • There is a problem... File with this name doesn't exist.
    – xtrontross
    Commented Mar 3, 2016 at 19:20

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.