diff options
Diffstat (limited to 'ext/spl/php_spl.c')
-rw-r--r-- | ext/spl/php_spl.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/ext/spl/php_spl.c b/ext/spl/php_spl.c index 44078733d6..1de8e021dd 100644 --- a/ext/spl/php_spl.c +++ b/ext/spl/php_spl.c @@ -351,7 +351,9 @@ PHP_FUNCTION(spl_autoload) while (ex && (!ex->func || !ZEND_USER_CODE(ex->func->type))) { ex = ex->prev_execute_data; } - if (ex && ex->opline->opcode != ZEND_FETCH_CLASS) { + if (ex && + ex->opline->opcode != ZEND_FETCH_CLASS && + ex->opline->opcode != ZEND_NEW) { zend_throw_exception_ex(spl_ce_LogicException, 0 TSRMLS_CC, "Class %s could not be loaded", class_name->val); } else { php_error_docref(NULL TSRMLS_CC, E_ERROR, "Class %s could not be loaded", class_name->val); |