Bug #61528 [Fbk->NoF]: sort function crashes
Edit report at https://bugs.php.net/bug.php?id=61528&edit=1
ID: 61528
Updated by: php-bugs@lists.php.net
Reported by: alan dot mckay at gmail dot com
Summary: sort function crashes
-Status: Feedback
+Status: No Feedback
Type: Bug
Package: Arrays related
Operating System: Ubuntu 11.11
PHP Version: Irrelevant
New Comment:
No feedback was provided. The bug is being suspended because
we assume that you are no longer experiencing the problem.
If this is not the case and you are able to provide the
information that was requested earlier, please do so and
change the status of the bug back to "Open". Thank you.
Previous Comments:
------------------------------------------------------------------------
[2012-03-27 20:08:27] sixd@php.net
OK.
------------------------------------------------------------------------
[2012-03-27 20:03:35] alan dot mckay at gmail dot com
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.
------------------------------------------------------------------------
[2012-03-27 19:57:03] sixd@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
Thread (5 messages)