James Crumpton wrote: > I've run into a problem, when trying out 5.1.0b1, b2, and > php5-200507060230, with a script of mine that relies pretty heavily on > DomDocument and DomXPath. > > Using XPath, I pull nodes with a certain namespace (xx) from an xml > document. With 5.0.*, this works as expected. > > However, with 5.1.*, I'm getting what appears to memory corruption(?) of > the DomNode localName property. > > Previously > > echo $node->nodeName; > echo $node->localName; > > would yeild > > xx:nodename > nodename > > With 5.1, I'm getting instead > > xx:Õ¤9domN9dš9Øû > Õ¤9domN9dš9Øû > > In reducing the operations to a simple: > > $string = '<root xmlns:xx="xx"><xx:nodename /></root>'; > > $dom = new DomDocument; > $dom->loadXML($string); > foreach ($xpath->query('descendant-or-self::xx:*') as $node) { > echo $node->nodeName; > } > > ... i don't get the corrupt node names. Only when used in the larger > application framework do I run into the problem. > > I'm at a loss as to how to further troubleshoot this. And as the script > isn't causing a segfault, I don't really know what other information to > provide, or where to look. > > Any pointers or help with this would be much appreciated.
If you could run this thing under Valgrind and send us the output, it would help a lot. -Rasmus -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php