summaryrefslogtreecommitdiff
path: root/Zend/tests/enum/unserialize-non-existent-case.phpt
diff options
context:
space:
mode:
Diffstat (limited to 'Zend/tests/enum/unserialize-non-existent-case.phpt')
-rw-r--r--Zend/tests/enum/unserialize-non-existent-case.phpt17
1 files changed, 17 insertions, 0 deletions
diff --git a/Zend/tests/enum/unserialize-non-existent-case.phpt b/Zend/tests/enum/unserialize-non-existent-case.phpt
new file mode 100644
index 0000000000..2364db5b15
--- /dev/null
+++ b/Zend/tests/enum/unserialize-non-existent-case.phpt
@@ -0,0 +1,17 @@
+--TEST--
+Enum unserialize non-existent case
+--FILE--
+<?php
+
+enum Foo {
+ case Bar;
+}
+
+var_dump(unserialize('E:7:"Foo:Baz";'));
+
+?>
+--EXPECTF--
+Warning: unserialize(): Undefined constant Foo::Baz in %s on line %d
+
+Notice: unserialize(): Error at offset 14 of 14 bytes in %s on line %d
+bool(false)