- Add missing check
authorMarcus Boerger <helly@php.net>
Thu, 3 Nov 2005 21:28:16 +0000 (21:28 +0000)
committerMarcus Boerger <helly@php.net>
Thu, 3 Nov 2005 21:28:16 +0000 (21:28 +0000)
ext/spl/php_spl.c

index 66c8ca06c70127e7d2a28bd10ef923cb16a697c3..c3c16a700ac4bae4eb860aac7488e627a5acb8d6 100755 (executable)
@@ -399,7 +399,7 @@ PHP_FUNCTION(spl_autoload_register)
                        }
                        zval_dtor(&zfunc_name);
                        return;
-               } else if (!obj_ptr && !(alfi.func_ptr->common.fn_flags & ZEND_ACC_STATIC)) {
+               } else if (!obj_ptr && alfi.func_ptr && !(alfi.func_ptr->common.fn_flags & ZEND_ACC_STATIC)) {
                        if (do_throw) {
                                zend_throw_exception_ex(U_CLASS_ENTRY(spl_ce_LogicException), 0 TSRMLS_CC, "Passed array specifies a non static method but no object");
                        }