From:             kevin at theposseltd dot com
Operating system: Linux 
PHP version:      4.4.2
PHP Bug Type:     *General Issues
Bug description:  Windows/Linux inconsistency for array_multisort

Description:
------------
My development system is Windows based (XP)PHP 4.4.0 and after uploading
the code to my hosting server (LINUX PHP 4.4.2) I get error messages when
running the code, which worked fine on Windows. Nobody seems to be able to
help me - so I suspect it may be a bug or inconsistency between 4.4.0 and
4.4.2

I am trying to sort a multidimensional array using array_multisort - the
coding works perfectly on my development system but not on the Linux host
site.

Reproduce code:
---------------
array structure looks like ... (line taken from actual structure)

[17] => Array ( [0] => 98 [event_ID] => 98 [1] => 5 [event_code] => 5 [2]
=> 0 [event_SIG_code] => 0 [3] => Attraction [event_type] => Attraction
[4] => Lookout Discovery Centre [event_name] => Lookout Discovery Centre
[5] => Party [event_description] => Party [6] => OmVMYV [event_geocode] =>
OmVMYV [7] => RG12 7QW [event_postcode] => RG12 7QW [8] => 2005-10-07
[event_start_date] => 2005-10-07 [distance] => Array ( [kilometers] =>
43.55 [meters] => 43545.49 [miles] => 27.06 [furlongs] => 216.46 [feet] =>
142865.79 [yards] => 47621.93 [inches] => 1714389.5 [nautical] => 23.51
[error] => 0 ) ) 

Code causing the issue ...

foreach ($sort_result as $res) {
        
        $sortAux[] = $res['event_code'];
        array_multisort($sortAux, SORT_ASC,$sort_result);} 

// Re-sorts the GeoCode array by event_code


Expected result:
----------------
Expect the array to be sorted by 'event_code'(as it does in Windows
system)

Actual result:
--------------
Actual error output:

Warning: array_multisort(): Array sizes are inconsistent in
/content/StartupHostPlus/t/e/tellmewhatson.co.uk/web/event_headline_search.php
on line 65


-- 
Edit bug report at http://bugs.php.net/?id=36502&edit=1
-- 
Try a CVS snapshot (PHP 4.4): 
http://bugs.php.net/fix.php?id=36502&r=trysnapshot44
Try a CVS snapshot (PHP 5.1): 
http://bugs.php.net/fix.php?id=36502&r=trysnapshot51
Try a CVS snapshot (PHP 6.0): 
http://bugs.php.net/fix.php?id=36502&r=trysnapshot60
Fixed in CVS:                 http://bugs.php.net/fix.php?id=36502&r=fixedcvs
Fixed in release:             
http://bugs.php.net/fix.php?id=36502&r=alreadyfixed
Need backtrace:               http://bugs.php.net/fix.php?id=36502&r=needtrace
Need Reproduce Script:        http://bugs.php.net/fix.php?id=36502&r=needscript
Try newer version:            http://bugs.php.net/fix.php?id=36502&r=oldversion
Not developer issue:          http://bugs.php.net/fix.php?id=36502&r=support
Expected behavior:            http://bugs.php.net/fix.php?id=36502&r=notwrong
Not enough info:              
http://bugs.php.net/fix.php?id=36502&r=notenoughinfo
Submitted twice:              
http://bugs.php.net/fix.php?id=36502&r=submittedtwice
register_globals:             http://bugs.php.net/fix.php?id=36502&r=globals
PHP 3 support discontinued:   http://bugs.php.net/fix.php?id=36502&r=php3
Daylight Savings:             http://bugs.php.net/fix.php?id=36502&r=dst
IIS Stability:                http://bugs.php.net/fix.php?id=36502&r=isapi
Install GNU Sed:              http://bugs.php.net/fix.php?id=36502&r=gnused
Floating point limitations:   http://bugs.php.net/fix.php?id=36502&r=float
No Zend Extensions:           http://bugs.php.net/fix.php?id=36502&r=nozend
MySQL Configuration Error:    http://bugs.php.net/fix.php?id=36502&r=mysqlcfg

Reply via email to