PEAR is archived and read-only

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

Home » XML » XML_XPath » Bug #221

error when loading file

Details

Submitted2003-11-10 10:05 UTC
Fromlectrix at symbion dot at
Assigneddallen
StatusClosed
PackageXML_XPath
PHP Version4.3.3
OSlinux
Roadmaps(Not assigned)

Comments

[2003-11-10 10:05 UTC] lectrix at symbion dot at

Description:
------------
(this is my first bug report, ever, yeay ;-)

when loading a xml string i get an error -5 (XML_XPATH_NO_DOM).
i guess i found the problem, it's easy:

line #148:
the comparison should be case _in_sensitive,
i changed it to

if (strtoupper(get_class($this->xml)) == 'DOMDOCUMENT')

and it works fine :)

Reproduce code:
---------------
$xml = "SimplePage.xml";
$res = new XML_XPath(join("",file($xml)));
if (PEAR::isError($res))
die($res->getMessage() . $res->getCode());

Expected result:
----------------
expected return: xpath result object

Actual result:
--------------
pear error object

[2004-01-30 14:59 UTC] dallen at php dot net

Thank you for your bug report. This issue has already been fixed
in the latest released version of the package, which you can download at
http://pear.php.net/packages.php

Applied fix from CVS to release.