From: undefined at users dot berlios dot de
Operating system: GNU/Linux
PHP version: 5.2.5
PHP Bug Type: XSLT related
Bug description: A PHP Object can not be converted to a XPath-string in
XSLTProcessor::transform
Description:
------------
This Error Message is invalid. The Function becomes a DomDocument
from my Class DomBuilder method getDom()
[CODE]
/** Parse Validate XML and returns the DomDocument.
* @return \b DomDocument
*/
public function getDom()
{
$dom = new DomDocument( "1.0", "utf-8" );
$dom->validateOnParse = true;
$dom->loadXml( $this->saveXML(), LIBXML_DTDVALID );
return $dom;
}
[/CODE]
This Problem comes up with the Implantation of mysqli Extension.
Before the mysqli Extension was inserted to my Code the Script 100%
works.
~> rpm -q libxml2 libxslt
libxml2-2.6.27-2007209
libxslt-1.1.20-2007209
Reproduce code:
---------------
function hjcms_transform_template( DOMDocument $doc, $Template )
{
$tpl = $_SERVER['DOCUMENT_ROOT'] . "/tpl/" . $Template .
"/index.xslt";
if( is_readable( $tpl ) )
{
$style = new DOMDocument("1.0", "utf-8");
$style->load( $tpl );
$xslt = new XSLTProcessor;
$xslt->registerPHPFunctions();
$xslt->importStyleSheet( $style );
return $xslt->transformToDoc( $doc );
}
return $doc;
}
Expected result:
----------------
Warning: XSLTProcessor::transformToDoc()
[http://www.php.net/manual/de/function.XSLTProcessor-transformToDoc.php]:
A PHP Object can not be converted to a XPath-string in
$HOME/hjcms/website/src/hjcms_templates.php on line 36
--
Edit bug report at http://bugs.php.net/?id=44316&edit=1
--
Try a CVS snapshot (PHP 5.2):
http://bugs.php.net/fix.php?id=44316&r=trysnapshot52
Try a CVS snapshot (PHP 5.3):
http://bugs.php.net/fix.php?id=44316&r=trysnapshot53
Try a CVS snapshot (PHP 6.0):
http://bugs.php.net/fix.php?id=44316&r=trysnapshot60
Fixed in CVS: http://bugs.php.net/fix.php?id=44316&r=fixedcvs
Fixed in release:
http://bugs.php.net/fix.php?id=44316&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=44316&r=needtrace
Need Reproduce Script: http://bugs.php.net/fix.php?id=44316&r=needscript
Try newer version: http://bugs.php.net/fix.php?id=44316&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=44316&r=support
Expected behavior: http://bugs.php.net/fix.php?id=44316&r=notwrong
Not enough info:
http://bugs.php.net/fix.php?id=44316&r=notenoughinfo
Submitted twice:
http://bugs.php.net/fix.php?id=44316&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=44316&r=globals
PHP 4 support discontinued: http://bugs.php.net/fix.php?id=44316&r=php4
Daylight Savings: http://bugs.php.net/fix.php?id=44316&r=dst
IIS Stability: http://bugs.php.net/fix.php?id=44316&r=isapi
Install GNU Sed: http://bugs.php.net/fix.php?id=44316&r=gnused
Floating point limitations: http://bugs.php.net/fix.php?id=44316&r=float
No Zend Extensions: http://bugs.php.net/fix.php?id=44316&r=nozend
MySQL Configuration Error: http://bugs.php.net/fix.php?id=44316&r=mysqlcfg