check for nKeyLength not arKey

This commit is contained in:
Andrey Hristov 1999-07-27 16:26:30 +00:00
parent 6b79bbe842
commit 15d87d2452
2 changed files with 4 additions and 4 deletions

View File

@ -2,7 +2,7 @@ PHP 4.0 CHANGE LOG ChangeLog
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
??? ?? 1999, Version 4.0 Beta 2
- Fixed a bug that prevented uksort() from working correctly (Andrey)
- Fixed bugs in uksort() and ksort() sort ordering (Andrey)
- Fixed a memory leak when using assignment-op operators with lvalue of type
string.
- Fixed a problem in inheritence from classes that are defined in include()d

View File

@ -634,11 +634,11 @@ static int array_key_compare(const void *a, const void *b)
first = *((Bucket **) a);
second = *((Bucket **) b);
if (first->arKey == NULL && second->arKey == NULL) {
if (first->nKeyLength == 0 && second->nKeyLength == 0) {
return (first->h - second->h);
} else if (first->arKey == NULL) {
} else if (first->nKeyLength == 0) {
return -1;
} else if (second->arKey == NULL) {
} else if (second->nKeyLength == 0) {
return 1;
}
min = MIN(first->nKeyLength, second->nKeyLength);