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

ID: 14427
Updated by: [email protected]
Reported By: vaneerd at gmail dot com
Summary: Empty SQL-Result + Array_Merge
Status: Open
Type: Bug
Package: Structures_DataGrid
Operating System: Independent
Package Version: 0.9.0
PHP Version: 5.2.5
Roadmap Versions:
New Comment:

I see what you mean, but really the datasource should never return a non
array for
use in this funciton, IMO.


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

[2008-07-31 06:20:24] vaneerd

Description:
------------
I use Structures_DataGrid with Structures_DataGrid_DataSource_DB(Query)
& Structures_DataGrid_Renderer_HTML_Table.
When the query provided in
$datagrid->bind($sql, $options);
returns no rows (because no rows matching the criteria where found)
there is an error on line 870 in Structures/DataGrid/Renderer.php
The function array_merge($this->_records, $chunk); leads to an error, as
$chunk is not an array!
My solution was to simply add
if (!is_array($chunk))
{
$chunk = array();
}

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

Search Discussions

  • Daniel Oconnor at Dec 26, 2011 at 5:00 pm
    Edit report at https://pear.php.net/bugs/bug.php?id=14427&edit=1

    ID: 14427
    Updated by: [email protected]
    Reported By: vaneerd at gmail dot com
    Summary: Empty SQL-Result + Array_Merge
    -Status: Open
    +Status: Closed
    Type: Bug
    Package: Structures_DataGrid
    Operating System: Independent
    Package Version: 0.9.0
    PHP Version: 5.2.5
    -Assigned To:
    +Assigned To: doconnor
    Roadmap Versions:
    New Comment:

    -Status: Open
    +Status: Closed
    -Assigned To:
    +Assigned To: doconnor
    This bug has been fixed in SVN.

    If this was a documentation problem, the fix will appear on pear.php.net
    by the end of next Sunday (CET).

    If this was a problem with the pear.php.net website, the change should
    be live shortly.

    Otherwise, the fix will appear in the package's next release.

    Thank you for the report and for helping us make PEAR better.

    Should be fixed now


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

    [2011-12-26 17:58:24] doconnor

    I see what you mean, but really the datasource should never return a non
    array for
    use in this funciton, IMO.

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

    [2008-07-31 06:20:24] vaneerd

    Description:
    ------------
    I use Structures_DataGrid with Structures_DataGrid_DataSource_DB(Query)
    & Structures_DataGrid_Renderer_HTML_Table.
    When the query provided in
    $datagrid->bind($sql, $options);
    returns no rows (because no rows matching the criteria where found)
    there is an error on line 870 in Structures/DataGrid/Renderer.php
    The function array_merge($this->_records, $chunk); leads to an error, as
    $chunk is not an array!
    My solution was to simply add
    if (!is_array($chunk))
    {
    $chunk = array();
    }

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

Related Discussions

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

1 user in discussion

Daniel Oconnor: 2 posts

People

Translate

site design / logo © 2023 Grokbase