i am using cake php 3. Some days ago I have updated php version from 5.6 to 7.1.17 . Now if there is any error happen in my apps it show An Internal Server Error Occurred"
. I can see error log in my error.log
file like this [Error] Call to a member function user() on boolean
Request URL: /robots.txt
Here is how my user()
function called. It was working fine with php 5.6..
public function beforeRender(Event $event)
{
if($this->Auth->user()){
$this->set('loggedIn', true);
}
else{
$this->set('loggedIn',false);
}
}