omusico / zfdatagrid

Automatically exported from code.google.com/p/zfdatagrid
BSD 3-Clause "New" or "Revised" License
0 stars 0 forks source link

Date-range filter does not work, PHP-Warning: urldecode() expects parameter 1 to be string #794

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. create a grid with a date-range column, display it
2. enter two dates into the filter-boxes

What is the expected output? What do you see instead?
expected: the data is filtered by dates "from" and "two"
instead: Warning: urldecode() expects parameter 1 to be string, array given in 
(...)/Bvb/Grid.php on line 1232

Please insert the appropriate values;
                    Zend Framework version: 1.11.11
ZFDatgrid Version (Bvb_Grid::getVersion()): 0.8
                          Operating system: Linux
                               PHP Version: 5.3.6
               Database Server and version: Mysql 5
Source Adatapter:

Please provide any additional information below.
I changed line 1232 to "$filter = @urldecode($filter);" to get rid of the 
warning, but the filter doesn't seem to work at all (it was ok with version 
0.7.1).

The column in question has a filter set to 'render' => 'date' and has been 
updated using "updateColumn" with 'format' => 'date'.

Original issue reported on code.google.com by buegelfa...@gmail.com on 2 Dec 2011 at 11:44

GoogleCodeExporter commented 9 years ago
try this:

if (!is_array($filter)){
    $filter = urldecode($filter);
} else{
    array_map("urldecode", $filter);
}

Original comment by juraj.va...@gmail.com on 29 Mar 2012 at 1:00

GoogleCodeExporter commented 9 years ago
This issue was closed by revision r1922.

Original comment by licentia...@gmail.com on 6 May 2012 at 5:58