#23543 [NEW]: unserialize on object fails when string is loaded with file()
From: tbrandl at barff dot de
Operating system: Win 2k
PHP version: 4.3.1
PHP Bug Type: Strings related
Bug description: unserialize on object fails when string is loaded with file()
this fails (output is null):
$string = unserialize(implode("", file("serialized_Obj.dat")));
print_r($string) == null;
this works:
fopen("serialized_Obj.dat");
$string = unserialize(fread($fh, ...));
print_r($string) == the original object.
--
Edit bug report at http://bugs.php.net/?id=23543&edit=1
--
Try a CVS snapshot: http://bugs.php.net/fix.php?id=23543&r=trysnapshot
Fixed in CVS: http://bugs.php.net/fix.php?id=23543&r=fixedcvs
Fixed in release: http://bugs.php.net/fix.php?id=23543&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=23543&r=needtrace
Try newer version: http://bugs.php.net/fix.php?id=23543&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=23543&r=support
Expected behavior: http://bugs.php.net/fix.php?id=23543&r=notwrong
Not enough info: http://bugs.php.net/fix.php?id=23543&r=notenoughinfo
Submitted twice: http://bugs.php.net/fix.php?id=23543&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=23543&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=23543&r=php3
Daylight Savings: http://bugs.php.net/fix.php?id=23543&r=dst
IIS Stability: http://bugs.php.net/fix.php?id=23543&r=isapi
Install GNU Sed: http://bugs.php.net/fix.php?id=23543&r=gnused
Thread (3 messages)
- tbrandl at barff dot de