Home » Structures » Structures_DataGrid » Bug #7521
Unknown Class passed Error for DataSource.php
Details
| Submitted | 2006-04-28 19:46 UTC |
|---|---|
| From | kmedlin at wcpss dot net |
| Assigned | wiesemann |
| Status | Closed |
| Package | Structures_DataGrid |
| PHP Version | 5.1.2 |
| OS | Windows XP SP2 |
| Roadmaps | (Not assigned) |
Comments
[2006-04-28 19:46 UTC] kmedlin at wcpss dot net
Description:
------------
Unknown class passed as parameter in C:\\php\\PEAR\\Structures\\DataGrid\\DataSource.php on line 365
Test script:
---------------
<?php
require 'Structures/DataGrid.php';
// Instantiate the DataGrid
$datagrid =& new Structures_DataGrid();
// Setup your database connection
$options = array('dsn' => 'mysql://username:password@host/myDB');
// Bind a basic SQL statement as datasource
$datagrid->bind("SELECT * FROM myTable",$options);
// Print the DataGrid with the default renderer (HTML Table)
$datagrid->render();
?>
Expected result:
----------------
I expected to see the output of this script as described by the text in the User Documentation that accompanies it.
Actual result:
--------------
Apache Log: [Fri Apr 28 15:36:52 2006] [error] [client 127.0.0.1] PHP Warning: Unknown class passed as parameter in C:\\php\\PEAR\\Structures\\DataGrid\\DataSource.php on line 365
Line 365 is:
case (is_subclass_of($source, 'db_dataobject')):
Looking through php.net I found the following:
User Comment in is_subclass_of():
"A bug report at http://pear.php.net/bugs/bug.php?id=2975 indicates that the "is_subclass_of" function can return the error message:
Warning: Unknown class passed as parameter
in the event that the class represented by the second argument hasn't yet been instantiated."
So this is a known issue by someone. This is current in version 0.6.3 of this package.