Re: [PHP-DEV] possible bug zend_hash_sort(...)

2001-06-26 Thread Andre Langhorst
> Well, if the array was passed in from somewhere else and is usually more > than one element, why would you clutter up your code checking every > time for the one-element (or no element) case rather than assuming > sort correctly handles all cases. (just for the records) :) *sorting* works in

[PHP-DEV] possible bug zend_hash_sort(...)

2001-06-26 Thread Andre Langhorst
Hi, apparently php-users are fooled (bug 9633, private email to me) by zends sorting on one-element arrays. In fact we do nothing there. > if (ht->nNumOfElements <= 1) { /* Doesn't require sorting */ > return SUCCESS; > } but zend_hash_sort is called with renumber=1 for s