diff options
author | Etienne Kneuss <colder@php.net> | 2008-12-30 23:34:29 +0000 |
---|---|---|
committer | Etienne Kneuss <colder@php.net> | 2008-12-30 23:34:29 +0000 |
commit | b296c25ba286e4a8ddb97d1b9fbfc696d25a8b3c (patch) | |
tree | d93ccd910389bd2945839477042588f59cbd74be /ext/spl | |
parent | 826cc0dc3ddaa4c9e5d5f58ec4689260d91b68a1 (diff) | |
download | php-git-b296c25ba286e4a8ddb97d1b9fbfc696d25a8b3c.tar.gz |
MFH: Fix #45820 (Empty ArrayObject keys not allowed)
Diffstat (limited to 'ext/spl')
-rwxr-xr-x | ext/spl/spl_array.c | 4 | ||||
-rwxr-xr-x | ext/spl/tests/array_018.phpt | bin | 688 -> 633 bytes |
2 files changed, 0 insertions, 4 deletions
diff --git a/ext/spl/spl_array.c b/ext/spl/spl_array.c index fb4d12a7de..dd423ab683 100755 --- a/ext/spl/spl_array.c +++ b/ext/spl/spl_array.c @@ -433,10 +433,6 @@ static void spl_array_write_dimension_ex(int check_inherited, zval *object, zval } switch(Z_TYPE_P(offset)) { case IS_STRING: - if (*Z_STRVAL_P(offset) == '\0') { - zend_throw_exception(spl_ce_InvalidArgumentException, "An offset must not begin with \\0 or be empty", 0 TSRMLS_CC); - return; - } Z_ADDREF_P(value); zend_symtable_update(spl_array_get_hash_table(intern, 0 TSRMLS_CC), Z_STRVAL_P(offset), Z_STRLEN_P(offset)+1, (void**)&value, sizeof(void*), NULL); return; diff --git a/ext/spl/tests/array_018.phpt b/ext/spl/tests/array_018.phpt Binary files differindex 996d276e04..7c68a6280e 100755 --- a/ext/spl/tests/array_018.phpt +++ b/ext/spl/tests/array_018.phpt |