#29782 [Opn->Csd]: Invalid XPath Context error when ZE1 compatibility mode is enabled
| From: | chregu@php.net | Date: | Fri, 24 Sep 2004 06:30:11 +0000 |
| Subject: | #29782 [Opn->Csd]: Invalid XPath Context error when ZE1 compatibility mode is enabled | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-66624@lists.php.net to get a copy of this message | ||
ID: 29782
Updated by: chregu@php.net
Reported By: jw at jwscripts dot com
-Status: Open
+Status: Closed
Bug Type: XSLT related
Operating System: Windows XP & 2000 / FreeBSD
PHP Version: 5.0.1
Previous Comments:
------------------------------------------------------------------------
[2004-09-23 22:10:15] jw at jwscripts dot com
I have downloaded and tried 5.0.2RC2 and the problem seems to be fixed.
The only "problem" was the obvious warning about object cloning (the
instances from the DOM classes should be created by reference with ZE1
compatibility).
------------------------------------------------------------------------
[2004-09-23 18:56:10] chregu@php.net
can you please check a recent snapshot and see if the problem persists?
------------------------------------------------------------------------
[2004-08-21 14:01:15] jw at jwscripts dot com
Also applies to Windows 2000 and FreeBSD installations.
------------------------------------------------------------------------
[2004-08-21 13:57:01] jw at jwscripts dot com
Description:
------------
When the ZE1 compatibility has been enabled (in php.ini:
zend.ze1_compatibility_mode=On), the usage of domXpath::query() results
in an Invalid XPath Context error.
There are no problems when the ZE1 compatibility is disabled.
Reproduce code:
---------------
$dom = new domDocument;
$dom->loadXML("<root> hello </root>");
$xpath = new domXPath($dom);
$results = $xpath->query('//root');
echo "<b>Node value:</b> ", $results->item(0)->nodeValue;
Expected result:
----------------
Node value: hello
Actual result:
--------------
Warning: Invalid XPath Context in [...] on line [...]
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=29782&edit=1