PEAR is archived and read-only

This mirror preserves historical PEAR package releases and metadata so existing references remain available.

Home » Structures » Structures_DataGrid_Renderer_Smarty » Bug #8403

Warnings with setDefaultSort()

Details

Submitted2006-08-09 20:32 UTC
Fromchris dot stone at gmail dot com
Assignedwiesemann
StatusClosed
PackageStructures_DataGrid_Renderer_Smarty
PHP Version5.1.4
OSLinux
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