diff options
Diffstat (limited to 'ext/xslt/xslt.c')
-rw-r--r-- | ext/xslt/xslt.c | 20 |
1 files changed, 16 insertions, 4 deletions
diff --git a/ext/xslt/xslt.c b/ext/xslt/xslt.c index 7811f865d3..1a240c874d 100644 --- a/ext/xslt/xslt.c +++ b/ext/xslt/xslt.c @@ -213,6 +213,7 @@ extern void xslt_free_arguments(xslt_args *to_free) Call an XSLT handler */ extern void xslt_call_function(char *name, zval *function, + zval *object, int argc, zval **user_args, zval **retval) @@ -227,10 +228,21 @@ extern void xslt_call_function(char *name, argv[idx] = &user_args[idx]; } - /* Call the function */ - error = call_user_function_ex(EG(function_table), - NULL, function, - retval, argc, argv, 0, NULL TSRMLS_CC); + + /* Call the function (with object when appropriate)*/ + if (object == NULL) + { + error = call_user_function_ex(EG(function_table), + NULL, function, + retval, argc, argv, 0, NULL TSRMLS_CC); + } + else + { + error = call_user_function_ex(EG(function_table), + &object, function, + retval, argc, argv, 0, NULL TSRMLS_CC); + } + if (error == FAILURE) { php_error(E_WARNING, "Cannot call the %s handler: %s", name, Z_STRVAL_P(function)); |