1
0
mirror of https://github.com/php/php-src.git synced 2026-04-28 10:43:30 +02:00

Disallow enums in ArrayObject

Closes GH-15775
This commit is contained in:
Ilija Tovilo
2024-09-06 12:31:06 +02:00
parent 20e3692a8c
commit d21bc7f1e6
3 changed files with 25 additions and 0 deletions
+15
View File
@@ -0,0 +1,15 @@
--TEST--
Enums are not compatible with ArrayObject
--FILE--
<?php
enum Foo {
case Bar;
}
new ArrayObject(Foo::Bar);
?>
--EXPECTF--
Fatal error: Uncaught InvalidArgumentException: Enums are not compatible with ArrayObject in %s:%d
%a