Bug #7521 [NEW]: Unknown Class passed Error for DataSource.php
| From: | kmedlin at wcpss dot net | Date: | Fri, 28 Apr 2006 19:46:58 +0000 |
| Subject: | Bug #7521 [NEW]: Unknown Class passed Error for DataSource.php | ||
| Groups: | php.pear.doc | ||
| Request: | Send a blank email to pear-doc+get-7834@lists.php.net to get a copy of this message | ||
From: kmedlin at wcpss dot net
Operating system: Windows XP SP2
Package version:
PHP version: 5.1.2
Package: Documentation
Bug Type: Bug
Bug description: Unknown Class passed Error for DataSource.php
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.
--
Edit bug report at http://pear.php.net/bugs/bug.php?id=7521&edit=1
--