Home » Structures » Structures_DataGrid_Renderer_Smarty » Bug #8403
Warnings with setDefaultSort()
Details
| Submitted | 2006-08-09 20:32 UTC |
|---|---|
| From | chris dot stone at gmail dot com |
| Assigned | wiesemann |
| Status | Closed |
| Package | Structures_DataGrid_Renderer_Smarty |
| PHP Version | 5.1.4 |
| OS | Linux |
| Roadmaps | (Not assigned) |
Comments
[2006-08-09 20:32 UTC] chris dot stone at gmail dot com
Description:
------------
Using setDefaultSort() with the Smarty Renderer causes warnings to show up in my error log.
Test script:
---------------
<?php
require 'Smarty.php';
require 'Structures/DataGrid.php';
$s = new Smarty;
$d = new Structures_DataGrid;
$d->setRenderer(DATAGRID_RENDER_SMARTY);
$d->setDefaultSort('symbol');
$d->bind('SELECT * FROM trade', array('dsn' => MY_DSN));
$d->fill($s);
$s->display('example.tpl');
?>
Expected result:
----------------
No warning messages show up in httpd error log.
Actual result:
--------------
[error] [client 192.168.1.1] PHP Warning: reset() [<a href='function.reset'>function.reset</a>]: Passed variable is not an array or object in /usr/share/pear/Structures/DataGrid/Renderer/Smarty.php on line 203
[error] [client 192.168.1.1] PHP Warning: Variable passed to each() is not an array or object in /usr/share/pear/Structures/DataGrid/Renderer/Smarty.php on line 204