From:             
Operating system: Ubuntu 11.11
PHP version:      Irrelevant
Package:          Arrays related
Bug Type:         Bug
Bug description:sort function crashes

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 bug report at https://bugs.php.net/bug.php?id=61528&edit=1
-- 
Try a snapshot (PHP 5.4):            
https://bugs.php.net/fix.php?id=61528&r=trysnapshot54
Try a snapshot (PHP 5.3):            
https://bugs.php.net/fix.php?id=61528&r=trysnapshot53
Try a snapshot (trunk):              
https://bugs.php.net/fix.php?id=61528&r=trysnapshottrunk
Fixed in SVN:                        
https://bugs.php.net/fix.php?id=61528&r=fixed
Fixed in SVN and need be documented: 
https://bugs.php.net/fix.php?id=61528&r=needdocs
Fixed in release:                    
https://bugs.php.net/fix.php?id=61528&r=alreadyfixed
Need backtrace:                      
https://bugs.php.net/fix.php?id=61528&r=needtrace
Need Reproduce Script:               
https://bugs.php.net/fix.php?id=61528&r=needscript
Try newer version:                   
https://bugs.php.net/fix.php?id=61528&r=oldversion
Not developer issue:                 
https://bugs.php.net/fix.php?id=61528&r=support
Expected behavior:                   
https://bugs.php.net/fix.php?id=61528&r=notwrong
Not enough info:                     
https://bugs.php.net/fix.php?id=61528&r=notenoughinfo
Submitted twice:                     
https://bugs.php.net/fix.php?id=61528&r=submittedtwice
register_globals:                    
https://bugs.php.net/fix.php?id=61528&r=globals
PHP 4 support discontinued:          
https://bugs.php.net/fix.php?id=61528&r=php4
Daylight Savings:                    https://bugs.php.net/fix.php?id=61528&r=dst
IIS Stability:                       
https://bugs.php.net/fix.php?id=61528&r=isapi
Install GNU Sed:                     
https://bugs.php.net/fix.php?id=61528&r=gnused
Floating point limitations:          
https://bugs.php.net/fix.php?id=61528&r=float
No Zend Extensions:                  
https://bugs.php.net/fix.php?id=61528&r=nozend
MySQL Configuration Error:           
https://bugs.php.net/fix.php?id=61528&r=mysqlcfg

Reply via email to