MFH: Fixed bug #61000 (Exceeding max nesting level doesn't delete numerical vars)

This commit is contained in:
Xinchen Hui 2012-03-02 03:18:04 +00:00
parent 0876d7bb89
commit 2e5e82a8ca
3 changed files with 22 additions and 1 deletions

2
NEWS
View file

@ -9,6 +9,8 @@ PHP NEWS
(Nikic, Laruence)
. Fixed bug #61011 (Crash when an exception is thrown by __autoload
accessing a static property). (Laruence)
. Fixed bug #61000 (Exceeding max nesting level doesn't delete numerical
vars). (Laruence)
- Standard:
. Fixed memory leak in substr_replace. (Pierrick)

View file

@ -133,7 +133,7 @@ PHPAPI void php_register_variable_ex(char *var_name, zval *val, zval *track_vars
if (track_vars_array) {
ht = Z_ARRVAL_P(track_vars_array);
zend_hash_del(ht, var, var_len + 1);
zend_symtable_del(ht, var, var_len + 1);
}
zval_dtor(val);

19
tests/basic/bug61000.phpt Normal file
View file

@ -0,0 +1,19 @@
--TEST--
Bug #61000 (Exceeding max nesting level doesn't delete numerical vars)
--INI--
max_input_nesting_level=2
--POST--
1[a][]=foo&1[a][b][c]=bar
--GET--
a[a][]=foo&a[a][b][c]=bar
--FILE--
<?php
print_r($_GET);
print_r($_POST);
--EXPECTF--
Array
(
)
Array
(
)