register_globals got turned off. All your $_SESSION variables (in your case, $_SESSION['SESSION']) need to be reference explicitly now. Add this at the top: $SESSION = $_SESSION['SESSION']; right after session_start(); On Mon, March 3, 2008 5:48 pm, Chris wrote: > Ben Edwards wrote: >> Our server has just been upgraded to PHP 5.2.5 and suddenly I am >> getting the following error: >> >> Fatal error: Call to a member function web_order_change() on a >> non-object in /var/www/vhosts/cultureshop.org/httpdocs/cart.php on >> line 32 >> >> The code is: >> >> $SESSION["cart"]->web_order_change( true ); >> >> The command 'global $SESSION;' is the first line of the script. >> >> $SESSION is the session variable created with >> >> session_start(); >> session_register("SESSION"); >> >> if ( !isset($SESSION["cart"]) ) { >> $SESSION["cart"] = new Cart; >> } >> >> I am guessing this is a change in OO handling, any idea what is >> going >> on and how to fix it? > > I don't think it's a change in OO handling, maybe it's a change in the > error_reporting level for the new version and you hadn't noticed the > problem before. > > The problem is that $SESSION['cart'] isn't an object - you'll have to > work out why. > > It could be that $SESSION['cart'] is getting overridden at some point > with another type of variable. > > -- > Postgresql & php tutorials > http://www.designmagick.com/ > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > > -- Some people have a "gift" link here. Know what I want? I want you to buy a CD from some indie artist. http://cdbaby.com/from/lynch Yeah, I get a buck. So? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php