diff options
Diffstat (limited to 'Zend/zend_API.c')
| -rw-r--r-- | Zend/zend_API.c | 11 | 
1 files changed, 11 insertions, 0 deletions
| diff --git a/Zend/zend_API.c b/Zend/zend_API.c index d8f627adad..68f0c7880c 100644 --- a/Zend/zend_API.c +++ b/Zend/zend_API.c @@ -26,6 +26,7 @@  #include "zend_modules.h"  #include "zend_constants.h"  #include "zend_exceptions.h" +#include "zend_closures.h"  #ifdef HAVE_STDARG_H  #include <stdarg.h> @@ -2615,6 +2616,16 @@ ZEND_API zend_bool zend_is_callable_ex(zval *callable, uint check_flags, char **  			}  			return 0; +		case IS_OBJECT: +			if (zend_get_closure(callable, ce_ptr, fptr_ptr, NULL, zobj_ptr_ptr TSRMLS_CC) == SUCCESS) { +				if (callable_name) { +					*callable_name_len = strlen((*fptr_ptr)->common.function_name); +					*callable_name = estrndup((*fptr_ptr)->common.function_name, *callable_name_len); +				}									 +				return 1; +			} +			/* break missing intentionally */ +  		default:  			if (callable_name) {  				zval expr_copy; | 
