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:
@@ -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
|
||||
Reference in New Issue
Block a user