summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorfoobar <sniper@php.net>2004-02-02 08:10:31 +0000
committerfoobar <sniper@php.net>2004-02-02 08:10:31 +0000
commit7ad385b10984919f97974906771ec30f50944775 (patch)
tree1a3d0e82d95fd45f09d9ffe67eec1d539db03b44
parentfec01159b140a03cd1f335441440ced3ee51571a (diff)
downloadphp-git-7ad385b10984919f97974906771ec30f50944775.tar.gz
CS fix (functions should not be available if they are not available :)
-rw-r--r--ext/simplexml/simplexml.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/ext/simplexml/simplexml.c b/ext/simplexml/simplexml.c
index 6cdac4d9b3..936aaf7fe8 100644
--- a/ext/simplexml/simplexml.c
+++ b/ext/simplexml/simplexml.c
@@ -1445,11 +1445,11 @@ static void php_sxe_iterator_rewind(zend_object_iterator *iter TSRMLS_DC)
}
+#ifdef HAVE_DOM
/* {{{ proto simplemxml_element simplexml_import_dom(domNode node [, string class_name])
Get a simplexml_element object from dom to allow for processing */
PHP_FUNCTION(simplexml_import_dom)
{
-#ifdef HAVE_DOM
php_sxe_object *sxe;
zval *node;
php_libxml_node_object *object;
@@ -1495,17 +1495,16 @@ PHP_FUNCTION(simplexml_import_dom)
php_error(E_WARNING, "Invalid Nodetype to import");
RETVAL_NULL();
}
-#else
- php_error(E_WARNING, "DOM support is not enabled");
- return;
-#endif
}
/* }}} */
+#endif
function_entry simplexml_functions[] = {
PHP_FE(simplexml_load_file, NULL)
PHP_FE(simplexml_load_string, NULL)
+#ifdef HAVE_DOM
PHP_FE(simplexml_import_dom, NULL)
+#endif
{NULL, NULL, NULL}
};