fault). (Christoph M. Becker)
. Fixed bug #69781 (phpinfo() reports Professional Editions of Windows
7/8/8.1/10 as "Business"). (Christian Wenz)
- . Fixes bug #69835 (phpinfo() does not report many Windows SKUs).
- . Fixed bug #69740 (finally in generator (yield) swallows exception in
- iteration). (Nikita)
+ . Fixed bug #69835 (phpinfo() does not report many Windows SKUs).
(Christian Wenz)
+ . Fixed bug #69889 (Null coalesce operator doesn't work for string offsets).
+ (Nikita)
+ . Fixed bug #69892 (Different arrays compare indentical due to integer key
+ truncation). (Nikita)
+- DOM:
+ . Fixed bug #69846 (Segmenation fault (access violation) when iterating over
+ DOMNodeList). (Anatol Belski)
+
- GD:
. Fixed bug #61221 (imagegammacorrect function loses alpha channel). (cmb)
return result;
}
- p1 = ht1->pListHead;
- if (ordered) {
- p2 = ht2->pListHead;
- }
+ for (idx1 = 0, idx2 = 0; idx1 < ht1->nNumUsed; idx1++) {
+ p1 = ht1->arData + idx1;
+ if (Z_TYPE(p1->val) == IS_UNDEF) continue;
- while (p1) {
- if (ordered && !p2) {
- HASH_UNPROTECT_RECURSION(ht1);
- HASH_UNPROTECT_RECURSION(ht2);
- return 1; /* That's not supposed to happen */
- }
if (ordered) {
- if (p1->nKeyLength==0 && p2->nKeyLength==0) { /* numeric indices */
+ while (1) {
+ p2 = ht2->arData + idx2;
+ if (idx2 == ht2->nNumUsed) {
+ HASH_UNPROTECT_RECURSION(ht1);
+ HASH_UNPROTECT_RECURSION(ht2);
+ return 1; /* That's not supposed to happen */
+ }
+ if (Z_TYPE(p2->val) != IS_UNDEF) break;
+ idx2++;
+ }
+ if (p1->key == NULL && p2->key == NULL) { /* numeric indices */
- result = p1->h - p2->h;
- if (result != 0) {
+ if (p1->h != p2->h) {
- HASH_UNPROTECT_RECURSION(ht1);
- HASH_UNPROTECT_RECURSION(ht2);
+ HASH_UNPROTECT_RECURSION(ht1);
+ HASH_UNPROTECT_RECURSION(ht2);
- return result;
+ return p1->h > p2->h ? 1 : -1;
}
} else { /* string indices */
- result = p1->nKeyLength - p2->nKeyLength;
- if (result!=0) {
- HASH_UNPROTECT_RECURSION(ht1);
- HASH_UNPROTECT_RECURSION(ht2);
- return result;
+ size_t len0 = (p1->key ? p1->key->len : 0);
+ size_t len1 = (p2->key ? p2->key->len : 0);
+ if (len0 != len1) {
+ HASH_UNPROTECT_RECURSION(ht1);
+ HASH_UNPROTECT_RECURSION(ht2);
+ return len0 > len1 ? 1 : -1;
}
- result = memcmp(p1->arKey, p2->arKey, p1->nKeyLength);
- if (result!=0) {
- HASH_UNPROTECT_RECURSION(ht1);
- HASH_UNPROTECT_RECURSION(ht2);
+ result = memcmp(p1->key->val, p2->key->val, p1->key->len);
+ if (result != 0) {
+ HASH_UNPROTECT_RECURSION(ht1);
+ HASH_UNPROTECT_RECURSION(ht2);
return result;
}
}