]> granicus.if.org Git - php/commitdiff
fix logic and memleak
authorAntony Dovgal <tony2001@php.net>
Tue, 8 Aug 2006 18:06:43 +0000 (18:06 +0000)
committerAntony Dovgal <tony2001@php.net>
Tue, 8 Aug 2006 18:06:43 +0000 (18:06 +0000)
ext/standard/array.c

index b71fae946f13f0230fe734485b07d9ae58c8c4e1..2bc47aace58dad5072a3f8fa5b6aca399e1b4613 100644 (file)
@@ -1504,7 +1504,7 @@ static void php_compact_var(HashTable *eg_active_symbol_table, zval *return_valu
                        UChar *norm;
                        int norm_len;
 
-                       if (!zend_normalize_identifier(&norm, &norm_len, key.u, key_len, 0)) {
+                       if (zend_normalize_identifier(&norm, &norm_len, key.u, key_len, 0) == FAILURE) {
                                zend_error(E_WARNING, "Could not normalize variable name: %r", key);
                        } else if (norm != key.u) {
                                key.u = norm;