diff options
| author | Marcus Boerger <helly@php.net> | 2005-12-16 22:17:32 +0000 |
|---|---|---|
| committer | Marcus Boerger <helly@php.net> | 2005-12-16 22:17:32 +0000 |
| commit | 57492cc2d4258ba08d3aa347b96cab2a0d89377d (patch) | |
| tree | c1c3d0b4d5685163bed48d3b73de4567b1757e6d /ext/spl/php_spl.c | |
| parent | 0cd997d79c1601e72047f8faea8614aaeaebc053 (diff) | |
| download | php-git-57492cc2d4258ba08d3aa347b96cab2a0d89377d.tar.gz | |
- Provide better error message when using illegal function 'pointers'
Diffstat (limited to 'ext/spl/php_spl.c')
| -rwxr-xr-x | ext/spl/php_spl.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/ext/spl/php_spl.c b/ext/spl/php_spl.c index 686068eee5..a003594f23 100755 --- a/ext/spl/php_spl.c +++ b/ext/spl/php_spl.c @@ -403,7 +403,7 @@ PHP_FUNCTION(spl_autoload_register) } } - if (!zend_is_callable_ex(zcallable, IS_CALLABLE_CHECK_IS_STATIC, &func_name, &func_name_len, &alfi.ce, &alfi.func_ptr, &obj_ptr TSRMLS_CC)) { + if (!zend_is_callable_ex(zcallable, IS_CALLABLE_STRICT, &func_name, &func_name_len, &alfi.ce, &alfi.func_ptr, &obj_ptr TSRMLS_CC)) { if (Z_TYPE_P(zcallable) == IS_ARRAY) { if (!obj_ptr && alfi.func_ptr && !(alfi.func_ptr->common.fn_flags & ZEND_ACC_STATIC)) { if (do_throw) { @@ -413,13 +413,13 @@ PHP_FUNCTION(spl_autoload_register) return; } else if (do_throw) { - zend_throw_exception_ex(spl_ce_LogicException, 0 TSRMLS_CC, "Passed array does not specify a callable %smethod", !obj_ptr ? "static " : ""); + zend_throw_exception_ex(spl_ce_LogicException, 0 TSRMLS_CC, "Passed array does not specify %s %smethod", alfi.func_ptr ? "a callable" : "an existing", !obj_ptr ? "static " : ""); } efree(func_name); return; } else if (Z_TYPE_P(zcallable) == IS_STRING) { if (do_throw) { - zend_throw_exception_ex(spl_ce_LogicException, 0 TSRMLS_CC, "Function '%s' not found", func_name); + zend_throw_exception_ex(spl_ce_LogicException, 0 TSRMLS_CC, "Function '%s' not %s", func_name, alfi.func_ptr ? "callable" : "found"); } efree(func_name); return; |
