Hi,
unserialize() cannot unserialize objects whose names contain anything except
a-z, 0-9 and _, the parser allows those, though.
Example
=======
$ cat unserialize.php
<?php
class �ber { }
var_dump(unserialize(serialize(new �ber())));
?>
Expected behaviour
==================
$ php unserialize.php
object(�ber)(0) {
}
Actual behaviour
================
$ php unserialize.php
bool(false)
PHP Notice: unserialize(): Error at offset 5 of 15 bytes in
F:\Programme\cygwin\home\thekid\unserialize.php on line 4
Cause
=====
http://cvs.php.net/diff.php/php-src/ext/standard/var_unserializer.re?sa=1&r1
=1.40&r2=1.41&ty=u
Fix
===
Allow anything the parser allows, [a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*
- Timm
--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php