Forum Moderators: coopster
Notice: Object of class Account could not be converted to int in /account.class.php on line 246
Line 246, within the Account class definition, is the "if" statement here:
public function __destruct(){
if(!isset($_SESSION['account']) ¦¦ $_SESSION['account'] != $this) $_SESSION['account'] = $this;
}
Is there something different about the way 5.1.4 handles __destruct that might be causing this?
$_SESSION['account'] != $thisPHP has an integer on the left side and an object reference on the right side, so it tries to juggle [us2.php.net] that object into an integer.
What is the variable name in the class that stores the integer account number? Whatever it is, you should change the $this to $this->account.
Any idea why 5.2.4 has no problem returning false to an object to int comparison whereas 5.1.4 fails on it? Was this considered a bug or is it something else in my configuration of 5.1.4 that's independent of the version?
Thanks for the help, btw.