I get this error in a PHP class ...
Fatal error: you cannot use the method return value in the context of the entry in C: \ web server \ HTDOCS \ friendproject2 \ includes \ classes \ User.class.php on line 35
Here is the worried part.
if(isset($this->session->get('user_id')) && $this->session->get('user_id') != ''){
}
This code is in my contrustor, this value is not set for $ this-> session-> get ('user_id') yet, then it will return false instead of Number. So, as you can see, I was hoping to check whether this number is a number or not or not even set.
Any help with fixation is appreciated.
source
share