diff --git a/Zend/tests/error_reporting/error_reporting_const_expr.phpt b/Zend/tests/error_reporting/error_reporting_const_expr.phpt new file mode 100644 index 0000000000000..af4081aa15627 --- /dev/null +++ b/Zend/tests/error_reporting/error_reporting_const_expr.phpt @@ -0,0 +1,13 @@ +--TEST-- +error_reporting via INI: Konstanten-Ausdruck (E_ERROR | E_CORE_ERROR) +--ENV-- +PHP_INI_ERROR_REPORTING="E_ERROR | E_CORE_ERROR" +--INI-- +error_reporting="${PHP_INI_ERROR_REPORTING}" +--FILE-- +children > 0) ? stmt_list->child[0] : NULL; + if (expr_ast) { + zend_const_expr_to_zval(&result, &expr_ast, 0); + if (Z_TYPE(result) != IS_LONG && Z_TYPE(result) != IS_UNDEF) { + zval_ptr_dtor(&result); + } else { + EG(error_reporting) = Z_LVAL(result); + zval_ptr_dtor(&result); + zend_ast_destroy(ast); + zend_arena_destroy(ast_arena); + return SUCCESS; + } + } + zend_ast_destroy(ast); + zend_arena_destroy(ast_arena); } + EG(error_reporting) = E_ALL; return SUCCESS; } /* }}} */