diff options
| author | Dmitry Stogov <dmitry@php.net> | 2005-08-22 12:22:16 +0000 |
|---|---|---|
| committer | Dmitry Stogov <dmitry@php.net> | 2005-08-22 12:22:16 +0000 |
| commit | 6b622046dc25b161706dbb25f6416a4f3ddf55ec (patch) | |
| tree | 134be93d8d80ed516f2587cab1224115083676db /ext/xsl | |
| parent | 6fad26469c9b0f539c51514d9a125ec34fc67ad8 (diff) | |
| download | php-git-6b622046dc25b161706dbb25f6416a4f3ddf55ec.tar.gz | |
zend_is_callable() and zend_make_callable() were changed to return readable function name as zval (instead of string).
Diffstat (limited to 'ext/xsl')
| -rw-r--r-- | ext/xsl/xsltprocessor.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/ext/xsl/xsltprocessor.c b/ext/xsl/xsltprocessor.c index 2e321312e8..f67af7e311 100644 --- a/ext/xsl/xsltprocessor.c +++ b/ext/xsl/xsltprocessor.c @@ -134,7 +134,7 @@ static void xsl_ext_function_php(xmlXPathParserContextPtr ctxt, int nargs, int t zval handler; xmlXPathObjectPtr obj; char *str; - char *callable = NULL; + zval callable; xsl_object *intern; TSRMLS_FETCH(); @@ -265,10 +265,10 @@ static void xsl_ext_function_php(xmlXPathParserContextPtr ctxt, int nargs, int t fci.no_separation = 0; /*fci.function_handler_cache = &function_ptr;*/ if (!zend_make_callable(&handler, &callable TSRMLS_CC)) { - php_error_docref(NULL TSRMLS_CC, E_WARNING, "Unable to call handler %s()", callable); + php_error_docref(NULL TSRMLS_CC, E_WARNING, "Unable to call handler %R()", Z_TYPE(callable), Z_UNIVAL(callable)); - } else if ( intern->registerPhpFunctions == 2 && zend_hash_exists(intern->registered_phpfunctions, callable, strlen(callable) + 1) == 0) { - php_error_docref(NULL TSRMLS_CC, E_WARNING, "Not allowed to call handler '%s()'.", callable); + } else if ( intern->registerPhpFunctions == 2 && zend_u_hash_exists(intern->registered_phpfunctions, Z_TYPE(callable), Z_UNIVLA(callable), Z_UNILEN(callable) + 1) == 0) { + php_error_docref(NULL TSRMLS_CC, E_WARNING, "Not allowed to call handler '%R()'.", Z_TYPE(callable), Z_UNILEN(callable)); // Push an empty string, so that we at least have an xslt result... valuePush(ctxt, xmlXPathNewString("")); } else { @@ -304,7 +304,7 @@ static void xsl_ext_function_php(xmlXPathParserContextPtr ctxt, int nargs, int t zval_ptr_dtor(&retval); } } - efree(callable); + zval_dtor(&callable); zval_dtor(&handler); if (fci.param_count > 0) { for (i = 0; i < nargs - 1; i++) { |
