From: Rob Richards Date: Fri, 8 Dec 2006 16:49:25 +0000 (+0000) Subject: mark more functions unicode safe X-Git-Tag: RELEASE_1_0_0RC1~758 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=45364aea047d950d1cfd7abf498727f3c236749d;p=php mark more functions unicode safe add test --- diff --git a/ext/dom/document.c b/ext/dom/document.c index 92890d0cc2..3b58faa0cb 100644 --- a/ext/dom/document.c +++ b/ext/dom/document.c @@ -2277,7 +2277,7 @@ PHP_FUNCTION(dom_document_save_html) #endif /* defined(LIBXML_HTML_ENABLED) */ -/* {{{ proto boolean DOMDocument::registerNodeClass(string baseclass, string extendedclass) +/* {{{ proto boolean DOMDocument::registerNodeClass(string baseclass, string extendedclass) U Register extended class used to create base node type */ PHP_METHOD(domdocument, registerNodeClass) { diff --git a/ext/dom/tests/domxpath.phpt b/ext/dom/tests/domxpath.phpt new file mode 100644 index 0000000000..c6304fe4e9 --- /dev/null +++ b/ext/dom/tests/domxpath.phpt @@ -0,0 +1,31 @@ +--TEST-- +DOMXPath Tests +--SKIPIF-- + +--FILE-- +loadXML(b'myval'); + +$xpath = new DOMXPath($dom); + +$xpath->registerNamespace("def", "urn::default"); +$nodelist = $xpath->query("//def:child"); +if ($node = $nodelist->item(0)) { + print $node->textContent."\n"; +} + +$count = $xpath->evaluate("count(//def:child)"); + +var_dump($count); + +$xpathdoc = $xpath->document; + +var_dump($xpathdoc instanceof DOMDocument); +?> +--EXPECT-- +myval +float(1) +bool(true) diff --git a/ext/dom/xpath.c b/ext/dom/xpath.c index ebfde0d5e8..f31603aa6f 100644 --- a/ext/dom/xpath.c +++ b/ext/dom/xpath.c @@ -102,7 +102,7 @@ int dom_xpath_document_read(dom_object *obj, zval **retval TSRMLS_DC) return SUCCESS; } -/* {{{ proto boolean dom_xpath_register_ns(string prefix, string uri); */ +/* {{{ proto boolean dom_xpath_register_ns(string prefix, string uri) U */ PHP_FUNCTION(dom_xpath_register_ns) { zval *id;