PEAR is archived and read-only

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

Home » Structures » Structures_DataGrid » Bug #7199

Source Type Detection Fails on XML

Details

Request #7199Source Type Detection Fails on XML
Submitted2006-03-24 18:08 UTC
Fromstevenjscott at gmail dot com
Assignedwiesemann
StatusClosed
PackageStructures_DataGrid
PHP Version5.0.4
OSFedora core4
Roadmaps(Not assigned)

Comments

[2006-03-24 18:08 UTC] stevenjscott at gmail dot com

Description:
------------
When passing an XML string as a data source to the factory it dies in the function _detectSourceType in DataSource.php

Test script:
---------------
$xml = file_get_contents('afile.xml');
$dg =& new Structures_DataGrid();
$data = Structures_DataGrid_DataSource::create($xml);
$dg->bindDataSource($data);

Expected result:
----------------
Render the XML in a datagrid output

Actual result:
--------------
First there is a warning:
Warning: Unknown class passed as parameter in /usr/share/pear/Structures/DataGrid/DataSource.php on line 365

Warning: main(XML/Unserializer.php) [function.main]: failed to open stream: No such file or directory in /usr/share/pear/Structures/DataGrid/DataSource/XML.php on line 23

Fatal error: main() [function.require]: Failed opening required 'XML/Unserializer.php' (include_path='.:/usr/share/pear') in /usr/share/pear/Structures/DataGrid/DataSource/XML.php on line 2

[2006-03-24 18:13 UTC] stevenjscott at gmail dot com

I should put a comment in here.
This took me a very long time to find this, so might better to put an output if the necessary packages for XML etc are not there to just print that to screen.
Maybe some simple checking in the check creator factory.

[2006-03-24 18:13 UTC] stevenjscott at gmail dot com

changing this to feature request and not bug
-oops