FAQ
Edit report at https://pear.php.net/bugs/bug.php?id=18259&edit=1

ID: 18259
Updated by: daniel.oconnor@gmail.com
Reported By: gaversa at stsweb dot fr
Summary: sorting not working
Status: Open
Type: Bug
Package: Structures_DataGrid
Operating System: debian squeeze
Package Version: 0.9.1dev1
PHP Version: 5.3.5
Roadmap Versions:
New Comment:

I changed this to call the array_multisort directly; but now unit tests
aren't happy.
This needs further work.


Previous Comments:
------------------------------------------------------------------------

[2011-05-27 06:41:27] blessmurk

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-02-10 11:40:46] aversag

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

------------------------------------------------------------------------

Search Discussions

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
grouppear-bugs @
categoriesphp
postedDec 26, '11 at 5:15p
activeDec 26, '11 at 5:15p
posts1
users1
websitepear.php.net

1 user in discussion

Daniel Oconnor: 1 post

People

Translate

site design / logo © 2022 Grokbase