Package home | Report new bug | New search | Development Roadmap Status: Open | Feedback | All | Closed Since Version 0.9.3

Bug #18259 sorting not working
Submitted: 2011-02-10 16:40 UTC
From: aversag Assigned:
Status: Open Package: Structures_DataGrid (version 0.9.1dev1)
PHP Version: 5.3.5 OS: debian squeeze
Roadmaps: (Not assigned)    
Subscription  
Comments Add Comment Add patch


Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know! Just going to say 'Me too!'? Don't clutter the database with that please !
Your email address:
MUST BE VALID
Solve the problem : 17 + 44 = ?

 
 [2011-02-10 16:40 UTC] aversag (Guillaume Aversa)
Description: ------------ ( ! ) Warning: Parameter 1 to array_multisort() expected to be a reference, value given in /usr/share/php/Structures/DataGrid/DataSource/Array.php on line 228 Test script: --------------- // include class include_once 'Structures/DataGrid.php'; // create new datagrid $dg = new Structures_DataGrid(); // Spécifie comment la grille de données doit être triée par défaut. $dg->setDefaultSort(array('name' => 'ASC')); // bind datagrid using array driver $dg->bind($DATA, array(), 'Array'); // render datagrid as HTML table $dg->render(); Expected result: ---------------- I was expecting to get the HTML table sorted by row "name" but it wasn't. Datas are showed like they are sorted in the array data Actual result: -------------- the sorting can't be applyed because of the array_multisort warning

Comments

 [2011-05-27 10:41 UTC] blessmurk (Dasari Babu)
confirmed in ubuntu maveric 5.3.3 possible duplicate of this bug http://bugs.php.net/bug.php?id=49069. & http://bugs.php.net/bug.php?id=43568 In my case General PHP programming error in use of call of reference method in passing args in datasource array.php line238 call_user_func_array('array_multisort', $args);
 [2011-12-26 23:15 UTC] doconnor (Daniel O'Connor)
I changed this to call the array_multisort directly; but now unit tests aren't happy. This needs further work.