Stupid Operand

  • Bogey
  • Bogey
  • Genius
  • User avatar
  • Joined: Jul 14, 2005
  • Posts: 8211
  • Loc: USA
  • Status: Offline

Post September 24th, 2010, 12:17 am

I'm being getting the following fatal error:
Quote:
Fatal error: Unsupported operand types in C:\wamp\www\Projects\CMS\includes\session.php on line 73

line 73 is:
PHP Code: [ Select ]
if((($current_time + $this->sess_expiry) - $sess_set) > $this->sess_expiry)


The code around it is:
PHP Code: [ Select ]
$current_time = time();
 
if((($current_time + $this->sess_expiry) - $sess_set) > $this->sess_expiry)
{
    return false;
}
 
  1. $current_time = time();
  2.  
  3. if((($current_time + $this->sess_expiry) - $sess_set) > $this->sess_expiry)
  4. {
  5.     return false;
  6. }
  7.  

Any help? I can't do addition/subtraction here?
"Bring forth therefore fruits meet for repentance:" Matthew 3:8
  • Anonymous
  • Bot
  • No Avatar
  • Joined: 25 Feb 2008
  • Posts: ?
  • Loc: Ozzuland
  • Status: Online

Post September 24th, 2010, 12:17 am

  • Bogey
  • Bogey
  • Genius
  • User avatar
  • Joined: Jul 14, 2005
  • Posts: 8211
  • Loc: USA
  • Status: Offline

Post September 24th, 2010, 12:19 am

Nevermind, got it fixed.

The variable $sess_set was coming from the database, and was an array. $sess_set['session_set'] fixed it.
"Bring forth therefore fruits meet for repentance:" Matthew 3:8
  • joebert
  • Sledgehammer
  • Genius
  • No Avatar
  • Joined: Feb 10, 2004
  • Posts: 13455
  • Loc: Florida
  • Status: Offline

Post September 24th, 2010, 1:45 am

Glad you found it. That would have been an interesting one to pipoint without knowing the data types of each variable. :)
Strong with this one, the sudo is.
  • Bogey
  • Bogey
  • Genius
  • User avatar
  • Joined: Jul 14, 2005
  • Posts: 8211
  • Loc: USA
  • Status: Offline

Post September 24th, 2010, 10:59 am

Yeah, I thought about it once I fixed it.... insufficient data supplied in the OP.
"Bring forth therefore fruits meet for repentance:" Matthew 3:8

Post Information

  • Total Posts in this topic: 4 posts
  • Users browsing this forum: No registered users and 131 guests
  • You cannot post new topics in this forum
  • You cannot reply to topics in this forum
  • You cannot edit your posts in this forum
  • You cannot delete your posts in this forum
  • You cannot post attachments in this forum
 
cron
 

© 2011 Unmelted, LLC. Ozzu® is a registered trademark of Unmelted, LLC.