Date: 04/30/00
- Next message: Sascha Schumann: "Re: [PHP-DEV] PHP 4.0 Bug #4285: Unexpected warning using an object in a session"
- Previous message: register <email protected>: "[PHP-DEV] ADV:CREDIT CARD PROCESSING"
- Next in thread: Sascha Schumann: "Re: [PHP-DEV] PHP 4.0 Bug #4285: Unexpected warning using an object in a session"
- Reply: Sascha Schumann: "Re: [PHP-DEV] PHP 4.0 Bug #4285: Unexpected warning using an object in a session"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
From: yzhang <email protected>
Operating system: Linux (Redhat 6.0)
PHP version: 4.0 Release Candidate 1
PHP Bug Type: Session related
Bug description: Unexpected warning using an object in a session
An unexpected warning comes back when I use an object in a session variable:
The code is this:
<?
error_reporting(15);
session_start();
session_register("SESSION");
if (! isset($SESSION)) {
class object {};
$SESSION = new object;
$SESSION->i = 5;
} else {
echo "My value is: $SESSION->i";
}
?>
Run it twice (first time to register the session, the second time to use it) and you will see this:
Warning: Unserializing non-existant class: stdClass! No methods will be available! in /home/httpd/htdocs/test.php on line 3
My value is: 5
Not sure why this is a warning, what is stdClass? I find no mention of it in the manual.
-- PHP Development Mailing List <http://www.php.net/> To unsubscribe, e-mail: php-dev-unsubscribe <email protected> For additional commands, e-mail: php-dev-help <email protected> To contact the list administrators, e-mail: php-list-admin <email protected>
- Next message: Sascha Schumann: "Re: [PHP-DEV] PHP 4.0 Bug #4285: Unexpected warning using an object in a session"
- Previous message: register <email protected>: "[PHP-DEV] ADV:CREDIT CARD PROCESSING"
- Next in thread: Sascha Schumann: "Re: [PHP-DEV] PHP 4.0 Bug #4285: Unexpected warning using an object in a session"
- Reply: Sascha Schumann: "Re: [PHP-DEV] PHP 4.0 Bug #4285: Unexpected warning using an object in a session"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]

