php-src/Zend/tests/enum/unserialize-missing-colon.phpt
Tim Düsterhus dd8de1e726
Promote unserialize() notices to warning (#9629)
* Unserialize: Migrate "Unexpected end of serialized data" to E_WARNING

* Unserialize: Migrate "Error at offset %d of %d bytes" to E_WARNING

* Unserialize: Migrate "%s is returned from __sleep() multiple times" to E_WARNING

* Add NEWS for “Promote unserialize() notices to warning”
2022-11-15 19:36:38 +01:00

17 lines
313 B
PHP

--TEST--
Enum unserialize with missing colon
--FILE--
<?php
enum Foo {
case Bar;
}
var_dump(unserialize('E:6:"FooBar";'));
?>
--EXPECTF--
Warning: unserialize(): Invalid enum name 'FooBar' (missing colon) in %s on line %d
Warning: unserialize(): Error at offset 0 of 13 bytes in %s on line %d
bool(false)