summaryrefslogtreecommitdiff
path: root/ext
diff options
context:
space:
mode:
authorEtienne Kneuss <colder@php.net>2008-12-30 23:34:29 +0000
committerEtienne Kneuss <colder@php.net>2008-12-30 23:34:29 +0000
commitb296c25ba286e4a8ddb97d1b9fbfc696d25a8b3c (patch)
treed93ccd910389bd2945839477042588f59cbd74be /ext
parent826cc0dc3ddaa4c9e5d5f58ec4689260d91b68a1 (diff)
downloadphp-git-b296c25ba286e4a8ddb97d1b9fbfc696d25a8b3c.tar.gz
MFH: Fix #45820 (Empty ArrayObject keys not allowed)
Diffstat (limited to 'ext')
-rwxr-xr-xext/spl/spl_array.c4
-rwxr-xr-xext/spl/tests/array_018.phptbin688 -> 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
index 996d276e04..7c68a6280e 100755
--- a/ext/spl/tests/array_018.phpt
+++ b/ext/spl/tests/array_018.phpt
Binary files differ