]> granicus.if.org Git - php/commitdiff
- MFH Add missing check
authorMarcus Boerger <helly@php.net>
Thu, 3 Nov 2005 21:28:43 +0000 (21:28 +0000)
committerMarcus Boerger <helly@php.net>
Thu, 3 Nov 2005 21:28:43 +0000 (21:28 +0000)
ext/spl/php_spl.c

index 2da96dd964f5f6074dcd5f0450c2eeb9d13bf8d7..3c6808901419f41eab08e9c7b52116a591705191 100755 (executable)
@@ -404,7 +404,7 @@ PHP_FUNCTION(spl_autoload_register)
        
                if (!zend_is_callable_ex(zcallable, 0, &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->common.fn_flags & ZEND_ACC_STATIC)) {
+                               if (!obj_ptr && alfi.func_ptr && !(alfi.func_ptr->common.fn_flags & ZEND_ACC_STATIC)) {
                                        if (do_throw) {
                                                zend_throw_exception_ex(spl_ce_LogicException, 0 TSRMLS_CC, "Passed array specifies a non static method but no object");
                                        }