Edit report at https://bugs.php.net/bug.php?id=61528&edit=1
ID: 61528 User updated by: alan dot mckay at gmail dot com Reported by: alan dot mckay at gmail dot com Summary: sort function crashes -Status: Feedback +Status: Open Type: Bug Package: Arrays related Operating System: Ubuntu 11.11 PHP Version: Irrelevant Block user comment: N Private report: N New Comment: I'll see what I can do. My PHP is pretty rusty - I uncovered this in someone else's code and I'm not sure whether or not they are interested in spending time on this. I'll see whether I can load the given array into a tiny best program to make it break again. Previous Comments: ------------------------------------------------------------------------ [2012-03-27 19:57:03] s...@php.net An actual running testcase would be appreciated so we reproduce EXACTLY what you do. ------------------------------------------------------------------------ [2012-03-27 13:31:33] alan dot mckay at gmail dot com Description: ------------ I am using the version of PHP from Ubuntu 11.11 and have the following array which causes sort to crash. The output below was produced with print_r just before the call to the sort. Sorry I cannot upgrade because there is no newer version available yet for ubuntu if I do 'apt-get upgrade' I do this call : sort($array, SORT_STRING); If I change it to this, it works : usort($array, strcasecmp); Version 5.3.6-13ubuntu3.5 Test script: --------------- ( [0] => SeqFeature Object ( [fType] => origin of replication [fValue] => F1 [fStart] => 138 [fEnd] => 444 [fDir] => reverse [fDescr] => [description] => [isFeature] => 1 [featureID] => -1 [pName] => [pAlias] => [pDescr] => [pCategory] => [pValue] => [propID] => ) [1] => SeqFeature Object ( [fType] => origin of replication [fValue] => pUC [fStart] => 1231 [fEnd] => 1850 [fDir] => reverse [fDescr] => [description] => [isFeature] => 1 [featureID] => -1 [pName] => [pAlias] => [pDescr] => [pCategory] => [pValue] => [propID] => ) ) Expected result: ---------------- Have the array sorted Actual result: -------------- Sort never returns ------------------------------------------------------------------------ -- Edit this bug report at https://bugs.php.net/bug.php?id=61528&edit=1