ID:               19842
 Updated by:       [EMAIL PROTECTED]
 Reported By:      [EMAIL PROTECTED]
-Status:           Open
+Status:           Bogus
 Bug Type:         Scripting Engine problem
 Operating System: linux
 PHP Version:      4CVS-2002-10-10
 New Comment:

Thank you for taking the time to write to us, but this is not
a bug. Please double-check the documentation available at
http://www.php.net/manual/ and the instructions on how to report
a bug at http://bugs.php.net/how-to-report.php

It'll work flawlesly if you second script also contains the class
defention ( class atest { var $t = 1; } ). Without it the class
defenition, everything works properly with the exception of is_object,
which is failing due to the class atest not being defined.


Previous Comments:
------------------------------------------------------------------------

[2002-10-10 02:13:16] [EMAIL PROTECTED]

variable object variables also fail on incomplete classes:

eg. (from the example below)

$data = unserialize(file_get_contents('/tmp/test'));
$key = 't';
var_dump($data->$key); // is blank.
//however
$ar = get_object_vars($data);
echo $ar[$key]; // produces 1



------------------------------------------------------------------------

[2002-10-10 01:55:22] [EMAIL PROTECTED]

Steps to reproduce
a) generate a serialized class
eg.
class atest {
  var $t = 1;
}
$t = new atest;
$fh = fopen('/tmp/test','w');
fwrite($fh,serialize($t));
fclose($fh);
----------------------
In another file
$data = unserialize(file_get_contents('/tmp/test'));
if (!is_object($data)) {
   echo "DATA is an ".gettype($b)."!\n"; }
}

---- should output 
DATA is an object!

It's on the verge of expected behaviour, but it would be nice if it
worked :)


        

------------------------------------------------------------------------


-- 
Edit this bug report at http://bugs.php.net/?id=19842&edit=1

Reply via email to