rasmus          Wed Aug 10 19:35:52 2005 EDT

  Modified files:              
    /php-src/main       php_variables.c 
  Log:
  MFB minor consistency cleanup
  
  
http://cvs.php.net/diff.php/php-src/main/php_variables.c?r1=1.104&r2=1.105&ty=u
Index: php-src/main/php_variables.c
diff -u php-src/main/php_variables.c:1.104 php-src/main/php_variables.c:1.105
--- php-src/main/php_variables.c:1.104  Wed Aug  3 10:08:38 2005
+++ php-src/main/php_variables.c        Wed Aug 10 19:35:51 2005
@@ -17,7 +17,7 @@
    +----------------------------------------------------------------------+
  */
 
-/* $Id: php_variables.c,v 1.104 2005/08/03 14:08:38 sniper Exp $ */
+/* $Id: php_variables.c,v 1.105 2005/08/10 23:35:51 rasmus Exp $ */
 
 #include <stdio.h>
 #include "php.h"
@@ -61,7 +61,7 @@
 {
        char *p = NULL;
        char *ip;               /* index pointer */
-       char *index;
+       char *index, *escaped_index = NULL;
        int var_len, index_len;
        zval *gpc_element, **gpc_element_p;
        zend_bool is_array;
@@ -114,7 +114,7 @@
 
        while (1) {
                if (is_array) {
-                       char *escaped_index = NULL, *index_s;
+                       char *index_s;
                        int new_idx_len = 0;
 
                        ip++;
@@ -183,7 +183,6 @@
                                zend_hash_next_index_insert(symtable1, 
&gpc_element, sizeof(zval *), (void **) &gpc_element_p);
                        } else {
                                zval **tmp;
-                               char *escaped_index;
 
                                if (PG(magic_quotes_gpc)) { 
                                        escaped_index = php_addslashes(index, 
index_len, &index_len, 0 TSRMLS_CC);
@@ -198,13 +197,13 @@
                                 */
                                if (PG(http_globals)[TRACK_VARS_COOKIE] && 
symtable1 == Z_ARRVAL_P(PG(http_globals)[TRACK_VARS_COOKIE]) && 
                                        zend_symtable_find(symtable1, 
escaped_index, index_len+1, (void **) &tmp) != FAILURE) {
-                                       if (PG(magic_quotes_gpc)) { 
+                                       if (index != escaped_index) {
                                                efree(escaped_index);
                                        }
                                        break;
                                }
                                zend_symtable_update(symtable1, escaped_index, 
index_len + 1, &gpc_element, sizeof(zval *), (void **) &gpc_element_p);
-                               if (PG(magic_quotes_gpc)) { 
+                               if (index != escaped_index) {
                                        efree(escaped_index);
                                }
                        }

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

Reply via email to