]> granicus.if.org Git - php/commitdiff
Fix strict array comparison
authorNikita Popov <nikic@php.net>
Wed, 23 Apr 2014 18:33:16 +0000 (20:33 +0200)
committerNikita Popov <nikic@php.net>
Wed, 23 Apr 2014 18:34:45 +0000 (20:34 +0200)
Fixes Symfony test failures

Zend/zend_hash.c

index 38e027d6080ec4f640138b4be5dfab1ce0f3fb69..ffe71a679125ee66a2b2458e82cec440953fa23e 100644 (file)
@@ -1655,7 +1655,7 @@ ZEND_API int zend_hash_compare(HashTable *ht1, HashTable *ht2, compare_func_t co
                                        HASH_UNPROTECT_RECURSION(ht2); 
                                        return 1; /* That's not supposed to happen */
                                }
-                               if (p2) break;
+                               if (Z_TYPE(p2->val) != IS_UNDEF) break;
                                idx2++;
                        }                                               
                        if (p1->key == NULL && p2->key == NULL) { /* numeric indices */