summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Stocker <chregu@php.net>2006-07-16 16:04:09 +0000
committerChristian Stocker <chregu@php.net>2006-07-16 16:04:09 +0000
commit2dbcfcb8cbf83aaaa6087f712793c3199eba33e6 (patch)
treeb351f6f8b0463c26b811b35c327976a6114117f1
parente79591b08101010eb79cf77c92e68d8e8e06f324 (diff)
downloadphp-git-2dbcfcb8cbf83aaaa6087f712793c3199eba33e6.tar.gz
improved code (after suggestion by helly)
-rw-r--r--ext/dom/node.c9
1 files changed, 3 insertions, 6 deletions
diff --git a/ext/dom/node.c b/ext/dom/node.c
index 5ae4827901..acc8f4197a 100644
--- a/ext/dom/node.c
+++ b/ext/dom/node.c
@@ -1870,15 +1870,12 @@ PHP_METHOD(domnode, getNodePath)
char *value;
- if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "O", &id, dom_node_class_entry) == FAILURE) {
- return;
- }
-
- DOM_GET_OBJ(nodep, id, xmlNodePtr, intern);
+
+ DOM_GET_THIS_OBJ(nodep, id, xmlNodePtr, intern);
value = xmlGetNodePath(nodep);
if (value == NULL) {
- RETURN_EMPTY_STRING();
+ RETURN_NULL();
} else {
RETVAL_STRING(value, 1);
xmlFree(value);