Permalink
Browse files

MFH: Fixed bug #61000 (Exceeding max nesting level doesn't delete num…

…erical vars)
  • Loading branch information...
laruence committed Mar 2, 2012
1 parent 0876d7b commit 2e5e82a8ca687d47eb413c1d3c6836f47eb007fb
Showing with 22 additions and 1 deletion.
  1. +2 −0 NEWS
  2. +1 −1 main/php_variables.c
  3. +19 −0 tests/basic/bug61000.phpt
View
2 NEWS
@@ -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
@@ -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);
View
@@ -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
+(
+)

0 comments on commit 2e5e82a

Please sign in to comment.