PHP Classes

Can't use function return value in write context

Recommend this page to a friend!

      PHP User Login class  >  All threads  >  Can't use function return value in...  >  (Un) Subscribe thread alerts  
Subject:Can't use function return value in...
Summary:user.class.php on line 74 -Error
Messages:2
Author:Ryszard
Date:2016-11-29 09:59:41
 

  1. Can't use function return value in...   Reply   Report abuse  
Picture of Ryszard Ryszard - 2016-11-29 09:59:41
Dear Oleg,

I have to say I'm starting with php. I got this error when I tried to start the script. Have you got any idea why?

Many thanks,
Richard

  2. Re: Can't use function return value in...   Reply   Report abuse  
Picture of Oleg Zorin Oleg Zorin - 2016-12-01 07:55:33 - In reply to message 1 from Ryszard
Richard, good day!

What version of PHP do you use (it's should be under 5.4.0)?

You can check it using phpinfo() function. I'll try to check my code in your version.

And try to change line 74 in user.class.php:

from
if(!empty(session_id())) {

to
$session_id = session_id();
if(!empty($session_id)) {

Let me know, if it will helps - I'll make changes in class.