From: jw at jwscripts dot com
Operating system: Windows XP
PHP version: 5.0.1
PHP Bug Type: XSLT related
Bug description: Invalid XPath Context error when ZE1 compatibility mode is enabled
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 bug report at http://bugs.php.net/?id=29782&edit=1
--
Try a CVS snapshot (php4): http://bugs.php.net/fix.php?id=29782&r=trysnapshot4
Try a CVS snapshot (php5): http://bugs.php.net/fix.php?id=29782&r=trysnapshot5
Fixed in CVS: http://bugs.php.net/fix.php?id=29782&r=fixedcvs
Fixed in release: http://bugs.php.net/fix.php?id=29782&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=29782&r=needtrace
Need Reproduce Script: http://bugs.php.net/fix.php?id=29782&r=needscript
Try newer version: http://bugs.php.net/fix.php?id=29782&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=29782&r=support
Expected behavior: http://bugs.php.net/fix.php?id=29782&r=notwrong
Not enough info: http://bugs.php.net/fix.php?id=29782&r=notenoughinfo
Submitted twice: http://bugs.php.net/fix.php?id=29782&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=29782&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=29782&r=php3
Daylight Savings: http://bugs.php.net/fix.php?id=29782&r=dst
IIS Stability: http://bugs.php.net/fix.php?id=29782&r=isapi
Install GNU Sed: http://bugs.php.net/fix.php?id=29782&r=gnused
Floating point limitations: http://bugs.php.net/fix.php?id=29782&r=float