laruence                                 Fri, 02 Mar 2012 03:18:04 +0000

Revision: http://svn.php.net/viewvc?view=revision&revision=323769

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

Bug: https://bugs.php.net/61000 (Assigned) Exceeding max nesting level doesn't 
delete numerical vars
      
Changed paths:
    U   php/php-src/branches/PHP_5_4/NEWS
    U   php/php-src/branches/PHP_5_4/main/php_variables.c
    A   php/php-src/branches/PHP_5_4/tests/basic/bug61000.phpt
    U   php/php-src/trunk/NEWS

Modified: php/php-src/branches/PHP_5_4/NEWS
===================================================================
--- php/php-src/branches/PHP_5_4/NEWS   2012-03-02 03:14:20 UTC (rev 323768)
+++ php/php-src/branches/PHP_5_4/NEWS   2012-03-02 03:18:04 UTC (rev 323769)
@@ -9,6 +9,8 @@
     (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)

Modified: php/php-src/branches/PHP_5_4/main/php_variables.c
===================================================================
--- php/php-src/branches/PHP_5_4/main/php_variables.c   2012-03-02 03:14:20 UTC 
(rev 323768)
+++ php/php-src/branches/PHP_5_4/main/php_variables.c   2012-03-02 03:18:04 UTC 
(rev 323769)
@@ -133,7 +133,7 @@

                                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);

Added: php/php-src/branches/PHP_5_4/tests/basic/bug61000.phpt
===================================================================
--- php/php-src/branches/PHP_5_4/tests/basic/bug61000.phpt                      
        (rev 0)
+++ php/php-src/branches/PHP_5_4/tests/basic/bug61000.phpt      2012-03-02 
03:18:04 UTC (rev 323769)
@@ -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
+(
+)

Modified: php/php-src/trunk/NEWS
===================================================================
--- php/php-src/trunk/NEWS      2012-03-02 03:14:20 UTC (rev 323768)
+++ php/php-src/trunk/NEWS      2012-03-02 03:18:04 UTC (rev 323769)
@@ -6,8 +6,6 @@
   . World domination

 - Core:
-  . Fixed bug #61000 (Exceeding max nesting level doesn't delete numerical
-    vars). (Laruence)
   . Fixed bug #60978 (exit code incorrect). (Laruence)
   . Fixed bug #60573 (type hinting with "self" keyword causes weird errors).
     (Laruence)

-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to