From: [EMAIL PROTECTED]
Operating system: Linux
PHP version: 4.2.1
PHP Bug Type: Arrays related
Bug description: sorting using usort() does not produce correct result anymore
I used to make sorts with usort and calling the function below. This was
working on the last versions but not anymore on the 4.2.1 :/ which outputs
strange result.
function sort_function($a, $b)
{
if ((($a["livre"]/$a["quantite"]) == ($b["livre"]/$b["quantite"])) ||
$a["nom"] != $b["nom"]) return 0;
return (($a["livre"]/$a["quantite"]) < ($b["livre"]/$b["quantite"])) ?
-1 : 1;
}
--
Edit bug report at http://bugs.php.net/?id=17307&edit=1
--
Fixed in CVS: http://bugs.php.net/fix.php?id=17307&r=fixedcvs
Fixed in release: http://bugs.php.net/fix.php?id=17307&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=17307&r=needtrace
Try newer version: http://bugs.php.net/fix.php?id=17307&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=17307&r=support
Expected behavior: http://bugs.php.net/fix.php?id=17307&r=notwrong
Not enough info: http://bugs.php.net/fix.php?id=17307&r=notenoughinfo
Submitted twice: http://bugs.php.net/fix.php?id=17307&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=17307&r=globals