From d042d0880796cfe99262bb6fa44225e984c63ace Mon Sep 17 00:00:00 2001 From: Aaron Piotrowski Date: Sat, 16 May 2015 15:30:59 -0500 Subject: [PATCH 01/18] Remodel exceptions based on Throwable interface Added Throwable interface that exceptions must implement in order to be thrown. BaseException was removed, EngineException renamed to Error, and TypeException and ParseException renamed to TypeError and ParseError. Exception and Error no longer extend a common base class, rather they both implement the Throwable interface. --- Zend/zend.c | 8 +- Zend/zend_exceptions.c | 216 ++++++++++++++++++----------------- Zend/zend_exceptions.h | 9 +- Zend/zend_interfaces.c | 20 +++- Zend/zend_interfaces.h | 1 + Zend/zend_language_scanner.c | 10 +- Zend/zend_language_scanner.l | 10 +- ext/soap/soap.c | 8 +- 8 files changed, 156 insertions(+), 126 deletions(-) diff --git a/Zend/zend.c b/Zend/zend.c index f262f8b5d75dd..1c2cfd6c77006 100644 --- a/Zend/zend.c +++ b/Zend/zend.c @@ -882,7 +882,7 @@ void zenderror(const char *error) /* {{{ */ return; } - zend_throw_exception(zend_get_parse_exception(), error, E_PARSE); + zend_throw_exception(zend_get_parse_error(), error, E_PARSE); } /* }}} */ @@ -1059,7 +1059,7 @@ static void zend_error_va_list(int type, const char *format, va_list args) va_start(args, format); #endif zend_vspprintf(&message, 0, format, args); - zend_throw_exception(zend_get_engine_exception(), message, type); + zend_throw_exception(zend_get_error(), message, type); efree(message); #if !defined(HAVE_NORETURN) || defined(HAVE_NORETURN_ALIAS) va_end(args); @@ -1318,7 +1318,7 @@ ZEND_API void zend_type_error(const char *format, ...) /* {{{ */ va_start(va, format); zend_vspprintf(&message, 0, format, va); - zend_throw_exception(zend_get_type_exception(), message, E_ERROR); + zend_throw_exception(zend_get_type_error(), message, E_ERROR); efree(message); va_end(va); } /* }}} */ @@ -1331,7 +1331,7 @@ ZEND_API void zend_internal_type_error(zend_bool throw_exception, const char *fo va_start(va, format); zend_vspprintf(&message, 0, format, va); if (throw_exception) { - zend_throw_exception(zend_get_type_exception(), message, E_ERROR); + zend_throw_exception(zend_get_type_error(), message, E_ERROR); } else { zend_error(E_WARNING, message); } diff --git a/Zend/zend_exceptions.c b/Zend/zend_exceptions.c index 671c09cd60878..484fcdca60ccf 100644 --- a/Zend/zend_exceptions.c +++ b/Zend/zend_exceptions.c @@ -30,33 +30,43 @@ #include "zend_dtrace.h" #include "zend_smart_str.h" -static zend_class_entry *base_exception_ce; static zend_class_entry *default_exception_ce; static zend_class_entry *error_exception_ce; -static zend_class_entry *engine_exception_ce; -static zend_class_entry *parse_exception_ce; -static zend_class_entry *type_exception_ce; +static zend_class_entry *error_ce; +static zend_class_entry *parse_error_ce; +static zend_class_entry *type_error_ce; static zend_object_handlers default_exception_handlers; ZEND_API void (*zend_throw_exception_hook)(zval *ex); +ZEND_API zend_class_entry *zend_get_exception_base(zval *object) +{ + if (instanceof_function(Z_OBJCE_P(object), error_ce)) { + return error_ce; + } + + return default_exception_ce; +} + void zend_exception_set_previous(zend_object *exception, zend_object *add_previous) { zval tmp, *previous, zv, *pzv, rv; + zend_class_entry *base_ce; if (exception == add_previous || !add_previous || !exception) { return; } ZVAL_OBJ(&tmp, add_previous); - if (!instanceof_function(Z_OBJCE(tmp), base_exception_ce)) { + if (!instanceof_function(Z_OBJCE(tmp), zend_ce_throwable)) { zend_error_noreturn(E_CORE_ERROR, "Cannot set non exception as previous exception"); return; } ZVAL_OBJ(&zv, exception); pzv = &zv; do { - previous = zend_read_property(base_exception_ce, pzv, "previous", sizeof("previous")-1, 1, &rv); + base_ce = zend_get_exception_base(pzv); + previous = zend_read_property(base_ce, pzv, "previous", sizeof("previous")-1, 1, &rv); if (Z_TYPE_P(previous) == IS_NULL) { - zend_update_property(base_exception_ce, pzv, "previous", sizeof("previous")-1, &tmp); + zend_update_property(base_ce, pzv, "previous", sizeof("previous")-1, &tmp); GC_REFCOUNT(add_previous)--; return; } @@ -110,7 +120,7 @@ ZEND_API void zend_throw_exception_internal(zval *exception) /* {{{ */ } } if (!EG(current_execute_data)) { - if (exception && Z_OBJCE_P(exception) == parse_exception_ce) { + if (exception && Z_OBJCE_P(exception) == parse_error_ce) { return; } if(EG(exception)) { @@ -158,6 +168,7 @@ static zend_object *zend_default_exception_new_ex(zend_class_entry *class_type, zval obj; zend_object *object; zval trace; + zend_class_entry *base_ce; Z_OBJ(obj) = object = zend_objects_new(class_type); Z_OBJ_HT(obj) = &default_exception_handlers; @@ -170,15 +181,17 @@ static zend_object *zend_default_exception_new_ex(zend_class_entry *class_type, array_init(&trace); } Z_SET_REFCOUNT(trace, 0); + + base_ce = zend_get_exception_base(&obj); - if (EXPECTED(class_type != parse_exception_ce)) { - zend_update_property_string(base_exception_ce, &obj, "file", sizeof("file")-1, zend_get_executed_filename()); - zend_update_property_long(base_exception_ce, &obj, "line", sizeof("line")-1, zend_get_executed_lineno()); + if (EXPECTED(class_type != parse_error_ce)) { + zend_update_property_string(base_ce, &obj, "file", sizeof("file")-1, zend_get_executed_filename()); + zend_update_property_long(base_ce, &obj, "line", sizeof("line")-1, zend_get_executed_lineno()); } else { - zend_update_property_string(base_exception_ce, &obj, "file", sizeof("file")-1, zend_get_compiled_filename()->val); - zend_update_property_long(base_exception_ce, &obj, "line", sizeof("line")-1, zend_get_compiled_lineno()); + zend_update_property_string(base_ce, &obj, "file", sizeof("file")-1, zend_get_compiled_filename()->val); + zend_update_property_long(base_ce, &obj, "line", sizeof("line")-1, zend_get_compiled_lineno()); } - zend_update_property(base_exception_ce, &obj, "trace", sizeof("trace")-1, &trace); + zend_update_property(base_ce, &obj, "trace", sizeof("trace")-1, &trace); return object; } @@ -196,6 +209,12 @@ static zend_object *zend_error_exception_new(zend_class_entry *class_type) /* {{ } /* }}} */ +static zval *zend_get_exception_property(zval *object, const char *name, size_t name_length, zend_bool silent, zval *rv) /* {{{ */ +{ + return zend_read_property(zend_get_exception_base(object), object, name, name_length, silent, rv); +} +/* }}} */ + /* {{{ proto Exception Exception::__clone() Clone the exception object */ ZEND_METHOD(exception, __clone) @@ -212,25 +231,27 @@ ZEND_METHOD(exception, __construct) zend_string *message = NULL; zend_long code = 0; zval *object, *previous = NULL; + zend_class_entry *base_ce; int argc = ZEND_NUM_ARGS(); - if (zend_parse_parameters_ex(ZEND_PARSE_PARAMS_QUIET, argc, "|SlO!", &message, &code, &previous, base_exception_ce) == FAILURE) { + object = getThis(); + base_ce = zend_get_exception_base(object); + + if (zend_parse_parameters_ex(ZEND_PARSE_PARAMS_QUIET, argc, "|SlO!", &message, &code, &previous, base_ce) == FAILURE) { zend_error(E_EXCEPTION | E_ERROR, "Wrong parameters for Exception([string $exception [, long $code [, Exception $previous = NULL]]])"); return; } - object = getThis(); - if (message) { - zend_update_property_str(base_exception_ce, object, "message", sizeof("message")-1, message); + zend_update_property_str(base_ce, object, "message", sizeof("message")-1, message); } if (code) { - zend_update_property_long(base_exception_ce, object, "code", sizeof("code")-1, code); + zend_update_property_long(base_ce, object, "code", sizeof("code")-1, code); } if (previous) { - zend_update_property(base_exception_ce, object, "previous", sizeof("previous")-1, previous); + zend_update_property(base_ce, object, "previous", sizeof("previous")-1, previous); } } /* }}} */ @@ -244,8 +265,8 @@ ZEND_METHOD(error_exception, __construct) zval *object, *previous = NULL; int argc = ZEND_NUM_ARGS(); size_t message_len, filename_len; - - if (zend_parse_parameters_ex(ZEND_PARSE_PARAMS_QUIET, argc, "|sllslO!", &message, &message_len, &code, &severity, &filename, &filename_len, &lineno, &previous, base_exception_ce) == FAILURE) { + + if (zend_parse_parameters_ex(ZEND_PARSE_PARAMS_QUIET, argc, "|sllslO!", &message, &message_len, &code, &severity, &filename, &filename_len, &lineno, &previous, default_exception_ce) == FAILURE) { zend_error(E_EXCEPTION | E_ERROR, "Wrong parameters for ErrorException([string $exception [, long $code, [ long $severity, [ string $filename, [ long $lineno [, Exception $previous = NULL]]]]]])"); return; } @@ -253,25 +274,25 @@ ZEND_METHOD(error_exception, __construct) object = getThis(); if (message) { - zend_update_property_string(base_exception_ce, object, "message", sizeof("message")-1, message); + zend_update_property_string(default_exception_ce, object, "message", sizeof("message")-1, message); } if (code) { - zend_update_property_long(base_exception_ce, object, "code", sizeof("code")-1, code); + zend_update_property_long(default_exception_ce, object, "code", sizeof("code")-1, code); } if (previous) { - zend_update_property(base_exception_ce, object, "previous", sizeof("previous")-1, previous); + zend_update_property(default_exception_ce, object, "previous", sizeof("previous")-1, previous); } - zend_update_property_long(base_exception_ce, object, "severity", sizeof("severity")-1, severity); + zend_update_property_long(error_exception_ce, object, "severity", sizeof("severity")-1, severity); if (argc >= 4) { - zend_update_property_string(base_exception_ce, object, "file", sizeof("file")-1, filename); + zend_update_property_string(default_exception_ce, object, "file", sizeof("file")-1, filename); if (argc < 5) { lineno = 0; /* invalidate lineno */ } - zend_update_property_long(base_exception_ce, object, "line", sizeof("line")-1, lineno); + zend_update_property_long(default_exception_ce, object, "line", sizeof("line")-1, lineno); } } /* }}} */ @@ -282,9 +303,9 @@ ZEND_METHOD(error_exception, __construct) } #define GET_PROPERTY(object, name) \ - zend_read_property(base_exception_ce, (object), name, sizeof(name) - 1, 0, &rv) + zend_get_exception_property((object), name, sizeof(name) - 1, 0, &rv) #define GET_PROPERTY_SILENT(object, name) \ - zend_read_property(base_exception_ce, (object), name, sizeof(name) - 1, 1, &rv) + zend_get_exception_property((object), name, sizeof(name) - 1, 1, &rv) /* {{{ proto string Exception::getFile() Get the file in which the exception occurred */ @@ -551,12 +572,17 @@ ZEND_METHOD(exception, getTraceAsString) { zval *trace, *frame, rv; zend_ulong index; + zval *object; + zend_class_entry *base_ce; smart_str str = {0}; uint32_t num = 0; DEFAULT_0_PARAMS; + + object = getThis(); + base_ce = zend_get_exception_base(object); - trace = zend_read_property(base_exception_ce, getThis(), "trace", sizeof("trace")-1, 1, &rv); + trace = zend_read_property(base_ce, getThis(), "trace", sizeof("trace")-1, 1, &rv); if (Z_TYPE_P(trace) != IS_ARRAY) { RETURN_FALSE; } @@ -618,6 +644,7 @@ zend_string *zend_strpprintf(size_t max_len, const char *format, ...) /* {{{ */ ZEND_METHOD(exception, __toString) { zval trace, *exception; + zend_class_entry *base_ce; zend_string *str; zend_fcall_info fci; zval fname, rv; @@ -675,9 +702,12 @@ ZEND_METHOD(exception, __toString) } zval_dtor(&fname); + exception = getThis(); + base_ce = zend_get_exception_base(exception); + /* We store the result in the private property string so we can access * the result in uncaught exception handlers without memleaks. */ - zend_update_property_str(base_exception_ce, getThis(), "string", sizeof("string")-1, str); + zend_update_property_str(base_ce, exception, "string", sizeof("string")-1, str); RETURN_STR(str); } @@ -734,66 +764,48 @@ void zend_register_default_exception(void) /* {{{ */ zend_class_entry ce; zend_property_info *prop; - INIT_CLASS_ENTRY(ce, "BaseException", default_exception_functions); - base_exception_ce = zend_register_internal_class(&ce); - base_exception_ce->ce_flags |= ZEND_ACC_EXPLICIT_ABSTRACT_CLASS; - base_exception_ce->create_object = NULL; + INIT_CLASS_ENTRY(ce, "Exception", default_exception_functions); + default_exception_ce = zend_register_internal_class_ex(&ce, NULL); + default_exception_ce->create_object = zend_default_exception_new; memcpy(&default_exception_handlers, zend_get_std_object_handlers(), sizeof(zend_object_handlers)); default_exception_handlers.clone_obj = NULL; - - zend_declare_property_string(base_exception_ce, "message", sizeof("message")-1, "", ZEND_ACC_PROTECTED); - zend_declare_property_string(base_exception_ce, "string", sizeof("string")-1, "", ZEND_ACC_PRIVATE); - zend_declare_property_long(base_exception_ce, "code", sizeof("code")-1, 0, ZEND_ACC_PROTECTED); - zend_declare_property_null(base_exception_ce, "file", sizeof("file")-1, ZEND_ACC_PROTECTED); - zend_declare_property_null(base_exception_ce, "line", sizeof("line")-1, ZEND_ACC_PROTECTED); - zend_declare_property_null(base_exception_ce, "trace", sizeof("trace")-1, ZEND_ACC_PRIVATE); - zend_declare_property_null(base_exception_ce, "previous", sizeof("previous")-1, ZEND_ACC_PRIVATE); - - INIT_CLASS_ENTRY(ce, "Exception", NULL); - default_exception_ce = zend_register_internal_class_ex(&ce, base_exception_ce); - default_exception_ce->create_object = zend_default_exception_new; - - /* A trick, to make visible private properties of BaseException */ - ZEND_HASH_FOREACH_PTR(&default_exception_ce->properties_info, prop) { - if (prop->flags & ZEND_ACC_SHADOW) { - if (prop->name->len == sizeof("\0BaseException\0string")-1) { - prop->flags &= ~ZEND_ACC_SHADOW; - prop->flags |= ZEND_ACC_PRIVATE; - prop->ce = default_exception_ce; - } else if (prop->name->len == sizeof("\0BaseException\0trace")-1) { - prop->flags &= ~ZEND_ACC_SHADOW; - prop->flags |= ZEND_ACC_PRIVATE; - prop->ce = default_exception_ce; - } else if (prop->name->len == sizeof("\0BaseException\0previous")-1) { - prop->flags &= ~ZEND_ACC_SHADOW; - prop->flags |= ZEND_ACC_PRIVATE; - prop->ce = default_exception_ce; - } - } - } ZEND_HASH_FOREACH_END(); + zend_class_implements(default_exception_ce, 1, zend_ce_throwable); + + zend_declare_property_string(default_exception_ce, "message", sizeof("message")-1, "", ZEND_ACC_PROTECTED); + zend_declare_property_string(default_exception_ce, "string", sizeof("string")-1, "", ZEND_ACC_PRIVATE); + zend_declare_property_long(default_exception_ce, "code", sizeof("code")-1, 0, ZEND_ACC_PROTECTED); + zend_declare_property_null(default_exception_ce, "file", sizeof("file")-1, ZEND_ACC_PROTECTED); + zend_declare_property_null(default_exception_ce, "line", sizeof("line")-1, ZEND_ACC_PROTECTED); + zend_declare_property_null(default_exception_ce, "trace", sizeof("trace")-1, ZEND_ACC_PRIVATE); + zend_declare_property_null(default_exception_ce, "previous", sizeof("previous")-1, ZEND_ACC_PRIVATE); INIT_CLASS_ENTRY(ce, "ErrorException", error_exception_functions); error_exception_ce = zend_register_internal_class_ex(&ce, default_exception_ce); error_exception_ce->create_object = zend_error_exception_new; zend_declare_property_long(error_exception_ce, "severity", sizeof("severity")-1, E_ERROR, ZEND_ACC_PROTECTED); - INIT_CLASS_ENTRY(ce, "EngineException", NULL); - engine_exception_ce = zend_register_internal_class_ex(&ce, base_exception_ce); - engine_exception_ce->create_object = zend_default_exception_new; - - INIT_CLASS_ENTRY(ce, "ParseException", NULL); - parse_exception_ce = zend_register_internal_class_ex(&ce, base_exception_ce); - parse_exception_ce->create_object = zend_default_exception_new; + INIT_CLASS_ENTRY(ce, "Error", default_exception_functions); + error_ce = zend_register_internal_class_ex(&ce, NULL); + error_ce->create_object = zend_default_exception_new; + memcpy(&default_exception_handlers, zend_get_std_object_handlers(), sizeof(zend_object_handlers)); + default_exception_handlers.clone_obj = NULL; + zend_class_implements(error_ce, 1, zend_ce_throwable); + + zend_declare_property_string(error_ce, "message", sizeof("message")-1, "", ZEND_ACC_PROTECTED); + zend_declare_property_string(error_ce, "string", sizeof("string")-1, "", ZEND_ACC_PRIVATE); + zend_declare_property_long(error_ce, "code", sizeof("code")-1, 0, ZEND_ACC_PROTECTED); + zend_declare_property_null(error_ce, "file", sizeof("file")-1, ZEND_ACC_PROTECTED); + zend_declare_property_null(error_ce, "line", sizeof("line")-1, ZEND_ACC_PROTECTED); + zend_declare_property_null(error_ce, "trace", sizeof("trace")-1, ZEND_ACC_PRIVATE); + zend_declare_property_null(error_ce, "previous", sizeof("previous")-1, ZEND_ACC_PRIVATE); - INIT_CLASS_ENTRY(ce, "TypeException", NULL); - type_exception_ce = zend_register_internal_class_ex(&ce, engine_exception_ce); - type_exception_ce->create_object = zend_default_exception_new; -} -/* }}} */ + INIT_CLASS_ENTRY(ce, "ParseError", NULL); + parse_error_ce = zend_register_internal_class_ex(&ce, error_ce); + parse_error_ce->create_object = zend_default_exception_new; -ZEND_API zend_class_entry *zend_exception_get_base(void) /* {{{ */ -{ - return base_exception_ce; + INIT_CLASS_ENTRY(ce, "TypeError", NULL); + type_error_ce = zend_register_internal_class_ex(&ce, error_ce); + type_error_ce->create_object = zend_default_exception_new; } /* }}} */ @@ -809,21 +821,21 @@ ZEND_API zend_class_entry *zend_get_error_exception(void) /* {{{ */ } /* }}} */ -ZEND_API zend_class_entry *zend_get_engine_exception(void) /* {{{ */ +ZEND_API zend_class_entry *zend_get_error(void) /* {{{ */ { - return engine_exception_ce; + return error_ce; } /* }}} */ -ZEND_API zend_class_entry *zend_get_parse_exception(void) /* {{{ */ +ZEND_API zend_class_entry *zend_get_parse_error(void) /* {{{ */ { - return parse_exception_ce; + return parse_error_ce; } /* }}} */ -ZEND_API zend_class_entry *zend_get_type_exception(void) /* {{{ */ +ZEND_API zend_class_entry *zend_get_type_error(void) /* {{{ */ { - return type_exception_ce; + return type_error_ce; } /* }}} */ @@ -833,8 +845,8 @@ ZEND_API zend_object *zend_throw_exception(zend_class_entry *exception_ce, const zval ex; if (exception_ce) { - if (!instanceof_function(exception_ce, base_exception_ce)) { - zend_error(E_NOTICE, "Exceptions must be derived from the Exception base class"); + if (!instanceof_function(exception_ce, zend_ce_throwable)) { + zend_error(E_NOTICE, "Exceptions must implement Throwable"); exception_ce = default_exception_ce; } } else { @@ -844,10 +856,10 @@ ZEND_API zend_object *zend_throw_exception(zend_class_entry *exception_ce, const if (message) { - zend_update_property_string(base_exception_ce, &ex, "message", sizeof("message")-1, message); + zend_update_property_string(exception_ce, &ex, "message", sizeof("message")-1, message); } if (code) { - zend_update_property_long(base_exception_ce, &ex, "code", sizeof("code")-1, code); + zend_update_property_long(exception_ce, &ex, "code", sizeof("code")-1, code); } zend_throw_exception_internal(&ex); @@ -875,7 +887,7 @@ ZEND_API zend_object *zend_throw_error_exception(zend_class_entry *exception_ce, zval ex; zend_object *obj = zend_throw_exception(exception_ce, message, code); ZVAL_OBJ(&ex, obj); - zend_update_property_long(base_exception_ce, &ex, "severity", sizeof("severity")-1, severity); + zend_update_property_long(error_exception_ce, &ex, "severity", sizeof("severity")-1, severity); return obj; } /* }}} */ @@ -908,13 +920,13 @@ ZEND_API void zend_exception_error(zend_object *ex, int severity) /* {{{ */ ZVAL_OBJ(&exception, ex); ce_exception = Z_OBJCE(exception); EG(exception) = NULL; - if (ce_exception == parse_exception_ce || ce_exception == type_exception_ce) { + if (ce_exception == parse_error_ce || ce_exception == type_error_ce) { zend_string *message = zval_get_string(GET_PROPERTY(&exception, "message")); zend_string *file = zval_get_string(GET_PROPERTY_SILENT(&exception, "file")); zend_long line = zval_get_long(GET_PROPERTY_SILENT(&exception, "line")); zend_long code = zval_get_long(GET_PROPERTY_SILENT(&exception, "code")); - if (ce_exception == type_exception_ce && strstr(message->val, ", called in ")) { + if (ce_exception == type_error_ce && strstr(message->val, ", called in ")) { zend_error_helper(code, file->val, line, "%s and defined", message->val); } else { zend_error_helper(code, file->val, line, "%s", message->val); @@ -922,7 +934,7 @@ ZEND_API void zend_exception_error(zend_object *ex, int severity) /* {{{ */ zend_string_release(file); zend_string_release(message); - } else if (instanceof_function(ce_exception, base_exception_ce)) { + } else if (instanceof_function(ce_exception, default_exception_ce) || instanceof_function(ce_exception, error_ce)) { zval tmp, rv; zend_string *str, *file = NULL; zend_long line = 0; @@ -932,7 +944,7 @@ ZEND_API void zend_exception_error(zend_object *ex, int severity) /* {{{ */ if (Z_TYPE(tmp) != IS_STRING) { zend_error(E_WARNING, "%s::__toString() must return a string", ce_exception->name->val); } else { - zend_update_property_string(base_exception_ce, &exception, "string", sizeof("string")-1, EG(exception) ? ce_exception->name->val : Z_STRVAL(tmp)); + zend_update_property_string(zend_get_exception_base(&exception), &exception, "string", sizeof("string")-1, EG(exception) ? ce_exception->name->val : Z_STRVAL(tmp)); } } zval_ptr_dtor(&tmp); @@ -942,10 +954,8 @@ ZEND_API void zend_exception_error(zend_object *ex, int severity) /* {{{ */ ZVAL_OBJ(&zv, EG(exception)); /* do the best we can to inform about the inner exception */ - if (instanceof_function(ce_exception, base_exception_ce)) { - file = zval_get_string(GET_PROPERTY_SILENT(&zv, "file")); - line = zval_get_long(GET_PROPERTY_SILENT(&zv, "line")); - } + file = zval_get_string(GET_PROPERTY_SILENT(&zv, "file")); + line = zval_get_long(GET_PROPERTY_SILENT(&zv, "line")); zend_error_va(E_WARNING, (file && file->len > 0) ? file->val : NULL, line, "Uncaught %s in exception handling during call to %s::__tostring()", @@ -983,8 +993,8 @@ ZEND_API void zend_throw_exception_object(zval *exception) /* {{{ */ exception_ce = Z_OBJCE_P(exception); - if (!exception_ce || !instanceof_function(exception_ce, base_exception_ce)) { - zend_error(E_EXCEPTION | E_ERROR, "Exceptions must be valid objects derived from the Exception base class"); + if (!exception_ce || !instanceof_function(exception_ce, zend_ce_throwable)) { + zend_error(E_EXCEPTION | E_ERROR, "Exceptions must be valid objects implementing Throwable"); return; } zend_throw_exception_internal(exception); diff --git a/Zend/zend_exceptions.h b/Zend/zend_exceptions.h index e2c1f1fac7fe4..bae4c35a78f24 100644 --- a/Zend/zend_exceptions.h +++ b/Zend/zend_exceptions.h @@ -34,12 +34,13 @@ ZEND_API void zend_throw_exception_internal(zval *exception); void zend_register_default_exception(void); -ZEND_API zend_class_entry *zend_exception_get_base(void); +ZEND_API zend_class_entry *zend_get_exception_base(zval *object); + ZEND_API zend_class_entry *zend_exception_get_default(void); ZEND_API zend_class_entry *zend_get_error_exception(void); -ZEND_API zend_class_entry *zend_get_engine_exception(void); -ZEND_API zend_class_entry *zend_get_parse_exception(void); -ZEND_API zend_class_entry *zend_get_type_exception(void); +ZEND_API zend_class_entry *zend_get_error(void); +ZEND_API zend_class_entry *zend_get_parse_error(void); +ZEND_API zend_class_entry *zend_get_type_error(void); ZEND_API void zend_register_default_classes(void); /* exception_ce NULL or zend_exception_get_default() or a derived class diff --git a/Zend/zend_interfaces.c b/Zend/zend_interfaces.c index 54f8f8c117245..2b8f8a25bc8ec 100644 --- a/Zend/zend_interfaces.c +++ b/Zend/zend_interfaces.c @@ -28,6 +28,7 @@ ZEND_API zend_class_entry *zend_ce_aggregate; ZEND_API zend_class_entry *zend_ce_iterator; ZEND_API zend_class_entry *zend_ce_arrayaccess; ZEND_API zend_class_entry *zend_ce_serializable; +ZEND_API zend_class_entry *zend_ce_throwable; /* {{{ zend_call_method Only returns the returned zval if retval_ptr != NULL */ @@ -502,6 +503,19 @@ static int zend_implement_serializable(zend_class_entry *interface, zend_class_e } /* }}}*/ +/* {{{ zend_implement_traversable */ +static int zend_implement_throwable(zend_class_entry *interface, zend_class_entry *class_type) +{ + if (instanceof_function(class_type, zend_exception_get_default()) || instanceof_function(class_type, zend_get_error())) { + return SUCCESS; + } + zend_error_noreturn(E_CORE_ERROR, "Class %s cannot implement interface %s, extend Exception instead", + class_type->name->val, + interface->name->val); + return FAILURE; +} +/* }}} */ + /* {{{ function tables */ const zend_function_entry zend_funcs_aggregate[] = { ZEND_ABSTRACT_ME(iterator, getIterator, NULL) @@ -551,6 +565,8 @@ const zend_function_entry zend_funcs_serializable[] = { }; /* }}} */ +const zend_function_entry *zend_funcs_throwable = NULL; + #define REGISTER_ITERATOR_INTERFACE(class_name, class_name_str) \ {\ zend_class_entry ce;\ @@ -575,7 +591,9 @@ ZEND_API void zend_register_interfaces(void) REGISTER_ITERATOR_INTERFACE(arrayaccess, ArrayAccess); - REGISTER_ITERATOR_INTERFACE(serializable, Serializable) + REGISTER_ITERATOR_INTERFACE(serializable, Serializable); + + REGISTER_ITERATOR_INTERFACE(throwable, Throwable); } /* }}} */ diff --git a/Zend/zend_interfaces.h b/Zend/zend_interfaces.h index 8a8e0ce988a6b..daf0aae5dc141 100644 --- a/Zend/zend_interfaces.h +++ b/Zend/zend_interfaces.h @@ -31,6 +31,7 @@ extern ZEND_API zend_class_entry *zend_ce_aggregate; extern ZEND_API zend_class_entry *zend_ce_iterator; extern ZEND_API zend_class_entry *zend_ce_arrayaccess; extern ZEND_API zend_class_entry *zend_ce_serializable; +extern ZEND_API zend_class_entry *zend_ce_throwable; typedef struct _zend_user_iterator { zend_object_iterator it; diff --git a/Zend/zend_language_scanner.c b/Zend/zend_language_scanner.c index abf93d587cf00..e3b2de1a795c7 100644 --- a/Zend/zend_language_scanner.c +++ b/Zend/zend_language_scanner.c @@ -998,7 +998,7 @@ static int zend_scan_escape_string(zval *zendlval, char *str, int len, char quot } if (!valid) { - zend_throw_exception(zend_get_parse_exception(), + zend_throw_exception(zend_get_parse_error(), "Invalid UTF-8 codepoint escape sequence", E_PARSE); zval_ptr_dtor(zendlval); return FAILURE; @@ -1009,7 +1009,7 @@ static int zend_scan_escape_string(zval *zendlval, char *str, int len, char quot /* per RFC 3629, UTF-8 can only represent 21 bits */ if (codepoint > 0x10FFFF || errno) { - zend_throw_exception(zend_get_parse_exception(), + zend_throw_exception(zend_get_parse_error(), "Invalid UTF-8 codepoint escape sequence: Codepoint too large", E_PARSE); zval_ptr_dtor(zendlval); return FAILURE; @@ -2720,7 +2720,7 @@ int lex_scan(zval *zendlval) * Because the lexing itself doesn't do that for us */ if (end != yytext + yyleng) { - zend_throw_exception(zend_get_parse_exception(), "Invalid numeric literal", E_PARSE); + zend_throw_exception(zend_get_parse_error(), "Invalid numeric literal", E_PARSE); return T_ERROR; } } else { @@ -2736,7 +2736,7 @@ int lex_scan(zval *zendlval) } /* Also not an assert for the same reason */ if (end != yytext + yyleng) { - zend_throw_exception(zend_get_parse_exception(), + zend_throw_exception(zend_get_parse_error(), "Invalid numeric literal", E_PARSE); return T_ERROR; } @@ -2745,7 +2745,7 @@ int lex_scan(zval *zendlval) } /* Also not an assert for the same reason */ if (end != yytext + yyleng) { - zend_throw_exception(zend_get_parse_exception(), "Invalid numeric literal", E_PARSE); + zend_throw_exception(zend_get_parse_error(), "Invalid numeric literal", E_PARSE); return T_ERROR; } } diff --git a/Zend/zend_language_scanner.l b/Zend/zend_language_scanner.l index fdba4b9f07685..1204287ad93f1 100644 --- a/Zend/zend_language_scanner.l +++ b/Zend/zend_language_scanner.l @@ -996,7 +996,7 @@ static int zend_scan_escape_string(zval *zendlval, char *str, int len, char quot } if (!valid) { - zend_throw_exception(zend_get_parse_exception(), + zend_throw_exception(zend_get_parse_error(), "Invalid UTF-8 codepoint escape sequence", E_PARSE); zval_ptr_dtor(zendlval); return FAILURE; @@ -1007,7 +1007,7 @@ static int zend_scan_escape_string(zval *zendlval, char *str, int len, char quot /* per RFC 3629, UTF-8 can only represent 21 bits */ if (codepoint > 0x10FFFF || errno) { - zend_throw_exception(zend_get_parse_exception(), + zend_throw_exception(zend_get_parse_error(), "Invalid UTF-8 codepoint escape sequence: Codepoint too large", E_PARSE); zval_ptr_dtor(zendlval); return FAILURE; @@ -1635,7 +1635,7 @@ NEWLINE ("\r"|"\n"|"\r\n") * Because the lexing itself doesn't do that for us */ if (end != yytext + yyleng) { - zend_throw_exception(zend_get_parse_exception(), "Invalid numeric literal", E_PARSE); + zend_throw_exception(zend_get_parse_error(), "Invalid numeric literal", E_PARSE); return T_ERROR; } } else { @@ -1651,7 +1651,7 @@ NEWLINE ("\r"|"\n"|"\r\n") } /* Also not an assert for the same reason */ if (end != yytext + yyleng) { - zend_throw_exception(zend_get_parse_exception(), + zend_throw_exception(zend_get_parse_error(), "Invalid numeric literal", E_PARSE); return T_ERROR; } @@ -1660,7 +1660,7 @@ NEWLINE ("\r"|"\n"|"\r\n") } /* Also not an assert for the same reason */ if (end != yytext + yyleng) { - zend_throw_exception(zend_get_parse_exception(), "Invalid numeric literal", E_PARSE); + zend_throw_exception(zend_get_parse_error(), "Invalid numeric literal", E_PARSE); return T_ERROR; } } diff --git a/ext/soap/soap.c b/ext/soap/soap.c index 120274b272244..e6c7e5f4cd79d 100644 --- a/ext/soap/soap.c +++ b/ext/soap/soap.c @@ -1496,10 +1496,10 @@ static void _soap_server_exception(soapServicePtr service, sdlFunctionPtr functi ZVAL_OBJ(&exception_object, EG(exception)); if (instanceof_function(Z_OBJCE(exception_object), soap_fault_class_entry)) { soap_server_fault_ex(function, &exception_object, NULL); - } else if (instanceof_function(Z_OBJCE(exception_object), zend_get_engine_exception())) { + } else if (instanceof_function(Z_OBJCE(exception_object), zend_get_error())) { if (service->send_errors) { zval rv; - zend_string *msg = zval_get_string(zend_read_property(zend_exception_get_base(), &exception_object, "message", sizeof("message")-1, 0, &rv)); + zend_string *msg = zval_get_string(zend_read_property(zend_get_exception_base(&exception_object), &exception_object, "message", sizeof("message")-1, 0, &rv)); add_soap_fault_ex(&exception_object, this_ptr, "Server", msg->val, NULL, NULL); zend_string_release(msg); } else { @@ -2596,13 +2596,13 @@ static int do_request(zval *this_ptr, xmlDoc *request, char *location, char *act add_soap_fault(this_ptr, "Client", "SoapClient::__doRequest() failed", NULL, NULL); ret = FALSE; } else if (Z_TYPE_P(response) != IS_STRING) { - if (EG(exception) && instanceof_function(EG(exception)->ce, zend_get_engine_exception())) { + if (EG(exception) && instanceof_function(EG(exception)->ce, zend_get_error())) { zval rv; zend_string *msg; zval exception_object; ZVAL_OBJ(&exception_object, EG(exception)); - msg = zval_get_string(zend_read_property(zend_exception_get_base(), &exception_object, "message", sizeof("message")-1, 0, &rv)); + msg = zval_get_string(zend_read_property(zend_get_exception_base(&exception_object), &exception_object, "message", sizeof("message")-1, 0, &rv)); /* change class */ EG(exception)->ce = soap_fault_class_entry; set_soap_fault(&exception_object, NULL, "Client", msg->val, NULL, NULL, NULL); From 64b167d201e567ec213b5aa37c66536621835331 Mon Sep 17 00:00:00 2001 From: Aaron Piotrowski Date: Sat, 16 May 2015 16:49:14 -0500 Subject: [PATCH 02/18] Updated tests to reflect exception class changes. --- UPGRADING | 16 ++++----- Zend/tests/028.phpt | 2 +- Zend/tests/030.phpt | 6 ++-- Zend/tests/037.phpt | 2 +- Zend/tests/access_modifiers_010.phpt | 2 +- Zend/tests/add_002.phpt | 4 +-- Zend/tests/add_003.phpt | 4 +-- Zend/tests/add_004.phpt | 4 +-- Zend/tests/add_007.phpt | 4 +-- Zend/tests/arg_unpack/string_keys.phpt | 4 +-- Zend/tests/bug24773.phpt | 2 +- Zend/tests/bug26166.phpt | 12 +++---- Zend/tests/bug29015.phpt | 2 +- Zend/tests/bug29674.phpt | 2 +- Zend/tests/bug31102.phpt | 2 +- Zend/tests/bug32660.phpt | 2 +- Zend/tests/bug33318.phpt | 2 +- Zend/tests/bug34064.phpt | 2 +- Zend/tests/bug36071.phpt | 2 +- Zend/tests/bug36268.phpt | 2 +- Zend/tests/bug37251.phpt | 2 +- Zend/tests/bug37632.phpt | 2 +- Zend/tests/bug40621.phpt | 2 +- Zend/tests/bug41633_2.phpt | 2 +- Zend/tests/bug41633_3.phpt | 2 +- Zend/tests/bug41813.phpt | 2 +- Zend/tests/bug41919.phpt | 2 +- Zend/tests/bug42817.phpt | 2 +- Zend/tests/bug42818.phpt | 2 +- Zend/tests/bug42819.phpt | 2 +- Zend/tests/bug42937.phpt | 2 +- Zend/tests/bug43344_10.phpt | 2 +- Zend/tests/bug43344_11.phpt | 2 +- Zend/tests/bug43344_12.phpt | 2 +- Zend/tests/bug43344_13.phpt | 2 +- Zend/tests/bug43344_2.phpt | 2 +- Zend/tests/bug43344_6.phpt | 2 +- Zend/tests/bug43344_7.phpt | 2 +- Zend/tests/bug43344_8.phpt | 2 +- Zend/tests/bug43344_9.phpt | 2 +- Zend/tests/bug44141.phpt | 2 +- Zend/tests/bug46304.phpt | 2 +- Zend/tests/bug46381.phpt | 2 +- Zend/tests/bug47054.phpt | 2 +- Zend/tests/bug47699.phpt | 2 +- Zend/tests/bug47704.phpt | 2 +- Zend/tests/bug48215_2.phpt | 2 +- Zend/tests/bug48693.phpt | 12 +++---- Zend/tests/bug49866.phpt | 2 +- Zend/tests/bug50146.phpt | 2 +- Zend/tests/bug52484.phpt | 2 +- Zend/tests/bug52484_2.phpt | 2 +- Zend/tests/bug52484_3.phpt | 2 +- Zend/tests/bug61025.phpt | 2 +- Zend/tests/bug63111.phpt | 2 +- Zend/tests/bug63173.phpt | 2 +- Zend/tests/bug64135.phpt | 2 +- Zend/tests/bug64720.phpt | 8 ++--- Zend/tests/bug64966.phpt | 2 +- Zend/tests/bug65784.phpt | 2 +- Zend/tests/bug65911.phpt | 2 +- Zend/tests/bug68475.phpt | 4 +-- Zend/tests/bug68652.phpt | 2 +- Zend/tests/call_static_004.phpt | 2 +- Zend/tests/call_static_005.phpt | 2 +- Zend/tests/call_static_006.phpt | 2 +- Zend/tests/call_user_func_004.phpt | 2 +- Zend/tests/class_alias_008.phpt | 2 +- Zend/tests/class_alias_016.phpt | 2 +- Zend/tests/class_alias_020.phpt | 2 +- Zend/tests/class_constants_001.phpt | 2 +- .../tests/class_name_as_scalar_error_005.phpt | 2 +- .../tests/class_name_as_scalar_error_006.phpt | 2 +- .../tests/class_name_as_scalar_error_007.phpt | 2 +- Zend/tests/clone_001.phpt | 2 +- Zend/tests/clone_003.phpt | 2 +- Zend/tests/clone_004.phpt | 2 +- Zend/tests/closure_005.phpt | 2 +- Zend/tests/closure_019.phpt | 2 +- Zend/tests/closure_020.phpt | 2 +- Zend/tests/closure_022.phpt | 2 +- Zend/tests/closure_031.phpt | 2 +- Zend/tests/closure_033.phpt | 2 +- Zend/tests/closure_038.phpt | 6 ++-- Zend/tests/closure_039.phpt | 6 ++-- Zend/tests/closure_059.phpt | 6 ++-- .../constant_expressions_exceptions_002.phpt | 2 +- ...expressions_invalid_offset_type_error.phpt | 2 +- ...nt_expressions_self_referencing_array.phpt | 2 +- Zend/tests/dereference_002.phpt | 2 +- Zend/tests/dereference_010.phpt | 2 +- Zend/tests/div_002.phpt | 4 +-- Zend/tests/dynamic_call_001.phpt | 2 +- Zend/tests/dynamic_call_002.phpt | 2 +- Zend/tests/dynamic_call_003.phpt | 2 +- Zend/tests/dynamic_call_004.phpt | 2 +- Zend/tests/errmsg_044.phpt | 2 +- Zend/tests/exception_004.phpt | 2 +- Zend/tests/exception_005.phpt | 2 +- Zend/tests/exception_006.phpt | 2 +- Zend/tests/exception_010.phpt | 14 ++++---- Zend/tests/exception_013.phpt | 8 ++--- Zend/tests/exception_014.phpt | 4 +-- Zend/tests/exception_015.phpt | 4 +-- Zend/tests/exception_016.phpt | 4 +-- Zend/tests/exception_017.phpt | 8 ++--- Zend/tests/exception_before_fatal.phpt | 14 ++++---- Zend/tests/generators/bug63066.phpt | 2 +- Zend/tests/generators/bug65161.phpt | 2 +- Zend/tests/generators/bug67497.phpt | 2 +- Zend/tests/generators/clone.phpt | 2 +- .../errors/generator_instantiate_error.phpt | 2 +- .../resume_running_generator_error.phpt | 4 +-- .../yield_in_force_closed_finally_error.phpt | 2 +- .../generators/throw_not_an_exception.phpt | 2 +- .../yield_from_already_running.phpt | 2 +- Zend/tests/indirect_call_array_001.phpt | 2 +- Zend/tests/indirect_call_array_002.phpt | 2 +- Zend/tests/indirect_method_call_002.phpt | 2 +- Zend/tests/list_005.phpt | 2 +- Zend/tests/list_007.phpt | 2 +- Zend/tests/methods-on-non-objects-catch.phpt | 2 +- Zend/tests/methods-on-non-objects-usort.phpt | 2 +- Zend/tests/methods-on-non-objects.phpt | 2 +- Zend/tests/mul_001.phpt | 4 +-- Zend/tests/not_002.phpt | 4 +-- Zend/tests/ns_004.phpt | 2 +- Zend/tests/ns_026.phpt | 2 +- Zend/tests/ns_038.phpt | 2 +- Zend/tests/ns_057.phpt | 2 +- Zend/tests/ns_058.phpt | 2 +- Zend/tests/ns_076.phpt | 2 +- Zend/tests/ns_077_1.phpt | 2 +- Zend/tests/ns_077_2.phpt | 2 +- Zend/tests/ns_077_3.phpt | 2 +- Zend/tests/ns_077_4.phpt | 2 +- Zend/tests/ns_077_5.phpt | 2 +- Zend/tests/ns_077_6.phpt | 2 +- Zend/tests/ns_077_7.phpt | 2 +- Zend/tests/ns_077_8.phpt | 2 +- Zend/tests/ns_092.phpt | 2 +- Zend/tests/objects_017.phpt | 2 +- Zend/tests/objects_025.phpt | 2 +- Zend/tests/objects_026.phpt | 2 +- Zend/tests/objects_029.phpt | 2 +- Zend/tests/objects_030.phpt | 2 +- Zend/tests/offset_assign.phpt | 2 +- Zend/tests/offset_object.phpt | 2 +- .../parent_class_name_without_parent.phpt | 2 +- Zend/tests/require_parse_exception.phpt | 2 +- Zend/tests/str_offset_002.phpt | 6 ++-- Zend/tests/sub_001.phpt | 4 +-- Zend/tests/traits/bug60173.phpt | 2 +- Zend/tests/traits/bugs/alias01.phpt | 2 +- Zend/tests/traits/error_007.phpt | 2 +- Zend/tests/traits/error_012.phpt | 2 +- Zend/tests/traits/language008a.phpt | 2 +- Zend/tests/traits/language008b.phpt | 2 +- .../internal_function_strict_mode.phpt | 6 ++-- Zend/tests/typehints/scalar_basic.phpt | 2 +- Zend/tests/typehints/scalar_none.phpt | 2 +- Zend/tests/typehints/scalar_null.phpt | 2 +- Zend/tests/typehints/scalar_return_basic.phpt | 2 +- .../typehints/scalar_return_basic_64bit.phpt | 2 +- Zend/tests/typehints/scalar_strict.phpt | 2 +- Zend/tests/typehints/scalar_strict_64bit.phpt | 2 +- Zend/tests/typehints/scalar_strict_basic.phpt | 2 +- Zend/tests/use_const/no_global_fallback.phpt | 2 +- .../use_function/no_global_fallback.phpt | 2 +- .../use_function/no_global_fallback2.phpt | 2 +- .../method_call_on_string_literal.phpt | 2 +- .../varSyntax/tempDimFetchByRefError.phpt | 2 +- .../varSyntax/tempPropFetchByRefError.phpt | 2 +- .../variadic/typehint_suppressed_error.phpt | 2 +- .../tests/DateTimeZone_construct_error.phpt | 2 +- .../DateTimeZone_construct_variation1.phpt | 2 +- ext/date/tests/DateTime_construct_error.phpt | 2 +- .../tests/DateTime_construct_variation1.phpt | 4 +-- .../tests/DateTime_construct_variation2.phpt | 2 +- ext/date/tests/timezone_offset_get_error.phpt | 18 +++++----- .../tests/timezone_offset_get_variation1.phpt | 2 +- .../tests/timezone_offset_get_variation2.phpt | 2 +- .../tests/DOMAttr_construct_error_001.phpt | 2 +- .../DOMCDATASection_construct_error_001.phpt | 2 +- .../tests/DOMComment_construct_error_001.phpt | 2 +- ...MDocumentFragment_construct_error_001.phpt | 2 +- .../DOMDocument_saveHTMLFile_error2.phpt | 2 +- .../tests/DOMDocument_saveHTML_error2.phpt | 2 +- .../tests/DOMDocument_validate_error2.phpt | 2 +- ext/dom/tests/dom003.phpt | 6 ++-- ext/dom/tests/dom_set_attr_node.phpt | 6 ++-- ext/dom/tests/regsiter_node_class.phpt | 2 +- ext/fileinfo/tests/bug61173.phpt | 2 +- ext/fileinfo/tests/finfo_open_error.phpt | 2 +- ext/intl/tests/badargs.phpt | 2 +- ext/intl/tests/breakiter___construct.phpt | 2 +- .../tests/breakiter___construct_error.phpt | 6 ++-- .../tests/calendar_before_after_error.phpt | 16 ++++----- ext/intl/tests/calendar_equals_error.phpt | 10 +++--- ..._Least_Greatest_Minimum_Maximum_error.phpt | 8 ++--- ...r_get_getActualMaximum_Minumum_error2.phpt | 24 ++++++------- .../tests/calendar_isEquivalentTo_error.phpt | 12 +++---- .../tests/calendar_setTimeZone_error.phpt | 8 ++--- ext/intl/tests/formatter_fail.phpt | 6 ++-- .../gregoriancalendar___construct_error.phpt | 2 +- ext/intl/tests/msgfmt_fail.phpt | 10 +++--- ext/intl/tests/msgfmt_fail2.phpt | 10 +++--- .../tests/timezone_getCanonicalID_error.phpt | 2 +- .../tests/timezone_hasSameRules_error.phpt | 4 +-- ext/mysqli/tests/bug33491.phpt | 2 +- ext/mysqli/tests/bug38003.phpt | 2 +- .../tests/mysqli_driver_unclonable.phpt | 2 +- ext/mysqli/tests/mysqli_fetch_object.phpt | 2 +- .../mysqli_fetch_object_no_constructor.phpt | 2 +- ext/mysqli/tests/mysqli_fetch_object_oo.phpt | 6 ++-- .../tests/mysqli_result_unclonable.phpt | 2 +- ext/mysqli/tests/mysqli_stmt_unclonable.phpt | 2 +- ext/mysqli/tests/mysqli_unclonable.phpt | 2 +- ext/pdo/tests/bug47769.phpt | 2 +- ext/pdo/tests/pdo_025.phpt | 2 +- ext/pdo/tests/pdo_037.phpt | 2 +- ext/pdo_mysql/tests/bug_37445.phpt | 2 +- .../tests/pdo_mysql___construct.phpt | 2 +- .../tests/pdo_mysql___construct_options.phpt | 2 +- .../tests/pdo_mysql_attr_statement_class.phpt | 2 +- .../pdo_mysql_prepare_native_clear_error.phpt | 2 +- .../pdo_mysql_prepare_native_mixed_style.phpt | 2 +- .../tests/pdo_mysql_stmt_errorcode.phpt | 2 +- .../tests/pdo_mysql_stmt_multiquery.phpt | 2 +- ext/phar/tests/badparameters.phpt | 2 +- ext/phar/tests/bug60261.phpt | 2 +- .../tests/cache_list/frontcontroller29.phpt | 2 +- ext/phar/tests/frontcontroller29.phpt | 2 +- ext/phar/tests/pharfileinfo_construct.phpt | 2 +- .../ReflectionClass_CannotClone_basic.phpt | 2 +- .../tests/ReflectionClass_getName_error1.phpt | 2 +- .../ReflectionClass_isCloneable_001.phpt | 2 +- .../ReflectionClass_isIterateable_001.phpt | 2 +- ...ReflectionExtension_constructor_error.phpt | 6 ++-- .../ReflectionFunction_construct.001.phpt | 8 ++--- .../tests/ReflectionMethod_006.phpt | 4 +-- .../ReflectionMethod_constructor_error2.phpt | 6 ++-- .../ReflectionMethod_invokeArgs_error2.phpt | 2 +- .../ReflectionObject_getName_error1.phpt | 2 +- ...nParameter_invalidMethodInConstructor.phpt | 2 +- .../tests/ReflectionProperty_error.phpt | 6 ++-- ext/reflection/tests/bug64007.phpt | 2 +- ext/session/tests/bug60634_error_1.phpt | 2 +- ext/session/tests/bug60634_error_3.phpt | 2 +- ext/session/tests/bug60634_error_5.phpt | 2 +- .../tests/SimpleXMLElement_xpath.phpt | 2 +- ext/simplexml/tests/bug37565.phpt | 4 +-- ext/snmp/tests/snmp-object-error.phpt | 6 ++-- .../tests/CallbackFilterIteratorTest-002.phpt | 8 ++--- .../SplFixedArray__construct_param_array.phpt | 2 +- ...SplFixedArray__construct_param_string.phpt | 2 +- ...edArray_construct_param_SplFixedArray.phpt | 2 +- .../SplTempFileObject_constructor_error.phpt | 2 +- .../tests/arrayObject___construct_error1.phpt | 4 +-- .../tests/arrayObject___construct_error2.phpt | 2 +- .../tests/arrayObject_setFlags_basic2.phpt | 2 +- .../arrayObject_setIteratorClass_error1.phpt | 4 +-- ext/spl/tests/bug48023.phpt | 2 +- ext/spl/tests/bug49972.phpt | 2 +- ext/spl/tests/bug54292.phpt | 2 +- ext/spl/tests/fixedarray_005.phpt | 6 ++-- ext/spl/tests/fixedarray_009.phpt | 2 +- ext/spl/tests/fixedarray_015.phpt | 2 +- ext/spl/tests/iterator_035.phpt | 2 +- ext/spl/tests/iterator_042.phpt | 2 +- ext/spl/tests/iterator_056.phpt | 12 +++---- .../tests/recursive_tree_iterator_003.phpt | 2 +- ext/spl/tests/spl_004.phpt | 2 +- .../spl_iterator_iterator_constructor.phpt | 2 +- ..._iterator_recursive_getiterator_error.phpt | 2 +- ext/sqlite3/tests/sqlite3_02_open.phpt | 2 +- ext/standard/tests/array/arsort_object1.phpt | 2 +- ext/standard/tests/array/arsort_object2.phpt | 2 +- ext/standard/tests/general_functions/010.phpt | 2 +- .../tests/general_functions/bug47857.phpt | 2 +- ext/standard/tests/serialize/bug69152.phpt | 5 --- ext/tidy/tests/035.phpt | 2 +- ext/tokenizer/tests/parse_errors.phpt | 2 +- ext/xmlreader/tests/bug51936.phpt | 2 +- sapi/cgi/tests/004.phpt | 2 +- sapi/cli/tests/005.phpt | 4 +-- sapi/cli/tests/008.phpt | 2 +- sapi/cli/tests/bug43177.phpt | 2 +- sapi/cli/tests/php_cli_server_015.phpt | 2 +- tests/classes/abstract.phpt | 2 +- tests/classes/abstract_class.phpt | 2 +- tests/classes/abstract_inherit.phpt | 2 +- tests/classes/abstract_user_call.phpt | 2 +- tests/classes/array_access_012.phpt | 2 +- tests/classes/autoload_021.phpt | 2 +- tests/classes/bug27504.phpt | 2 +- tests/classes/class_abstract.phpt | 2 +- tests/classes/constants_basic_001.phpt | 2 +- tests/classes/ctor_visibility.phpt | 2 +- tests/classes/destructor_visibility_001.phpt | 2 +- tests/classes/factory_and_singleton_003.phpt | 2 +- tests/classes/factory_and_singleton_004.phpt | 2 +- tests/classes/factory_and_singleton_005.phpt | 2 +- tests/classes/factory_and_singleton_006.phpt | 2 +- tests/classes/factory_and_singleton_007.phpt | 2 +- tests/classes/factory_and_singleton_008.phpt | 2 +- tests/classes/interface_instantiate.phpt | 2 +- tests/classes/interfaces_001.phpt | 4 +-- tests/classes/interfaces_002.phpt | 6 ++-- tests/classes/private_001.phpt | 2 +- tests/classes/private_002.phpt | 2 +- tests/classes/private_003.phpt | 2 +- tests/classes/private_003b.phpt | 2 +- tests/classes/private_004.phpt | 2 +- tests/classes/private_004b.phpt | 2 +- tests/classes/private_005.phpt | 2 +- tests/classes/private_005b.phpt | 2 +- tests/classes/private_redeclare.phpt | 2 +- tests/classes/property_recreate_private.phpt | 2 +- .../classes/property_recreate_protected.phpt | 2 +- tests/classes/protected_001.phpt | 2 +- tests/classes/protected_001b.phpt | 2 +- tests/classes/protected_002.phpt | 2 +- .../classes/static_properties_003_error1.phpt | 2 +- .../classes/static_properties_003_error2.phpt | 2 +- .../classes/static_properties_003_error3.phpt | 2 +- .../classes/static_properties_003_error4.phpt | 4 +-- .../static_properties_undeclared_assign.phpt | 2 +- ...tatic_properties_undeclared_assignInc.phpt | 2 +- ...tatic_properties_undeclared_assignRef.phpt | 2 +- .../static_properties_undeclared_inc.phpt | 2 +- .../static_properties_undeclared_read.phpt | 2 +- tests/classes/type_hinting_004.phpt | 36 +++++++++---------- tests/lang/041.phpt | 2 +- tests/lang/042.phpt | 2 +- tests/lang/043.phpt | 2 +- tests/lang/044.phpt | 2 +- tests/lang/catchable_error_002.phpt | 2 +- tests/lang/foreachLoopIterator.002.phpt | 2 +- 339 files changed, 510 insertions(+), 515 deletions(-) diff --git a/UPGRADING b/UPGRADING index 2f0975cc6e0cd..77f3cbc49c3e5 100644 --- a/UPGRADING +++ b/UPGRADING @@ -323,21 +323,21 @@ Relevant RFCs: Changes to error handling ------------------------- -* The new base class of the exception hierarchy is BaseException, from which - Exception extends. Typehints in exception handling code may need to be changed - to account for this. +* There are now two exception classes: Exception and Error. Both classes + implement a new interface Throwable. Typehints in exception handling code + may need to be changed to account for this. -* Some fatal errors and recoverable fatal errors now throw an EngineException - instead. As EngineException extends BaseException but not Exception, these - exceptions will not caught by existing try/catch blocks. +* Some fatal errors and recoverable fatal errors now throw an Error instead. + As Error is a separate class from Exception, these exceptions will not caught + by existing try/catch blocks. For the recoverable fatal errors which have been converted into an exception, it is no longer possible to silently ignore the error from an error handler. In particular, it is no longer possible to ignore typehint failures. -* Parser errors now generate a ParseException (extends BaseException). Error +* Parser errors now generate a ParseError that extends Error. Error handling for eval()s on potentially invalid code should be changed to catch - ParseException in addition to the previous return value / error_get_last() + ParseError in addition to the previous return value / error_get_last() based handling. * Constructors of internal classes will now always throw an exception on diff --git a/Zend/tests/028.phpt b/Zend/tests/028.phpt index 810c091a872a4..701561f9c8d93 100644 --- a/Zend/tests/028.phpt +++ b/Zend/tests/028.phpt @@ -20,7 +20,7 @@ bool(true) Notice: Undefined offset: 2 in %s on line %d -Fatal error: Uncaught exception 'EngineException' with message 'Function name must be a string' in %s:%d +Fatal error: Uncaught exception 'Error' with message 'Function name must be a string' in %s:%d Stack trace: #0 {main} thrown in %s on line %d diff --git a/Zend/tests/030.phpt b/Zend/tests/030.phpt index cff21d49354ea..8afcb66bd865b 100644 --- a/Zend/tests/030.phpt +++ b/Zend/tests/030.phpt @@ -34,7 +34,7 @@ $test->bar(); object(Exception)#%d (7) { ["message":protected]=> string(3) "foo" - ["string":"BaseException":private]=> + ["string":"Exception":private]=> string(0) "" ["code":protected]=> int(0) @@ -42,7 +42,7 @@ object(Exception)#%d (7) { string(%d) "%s030.php" ["line":protected]=> int(%d) - ["trace":"BaseException":private]=> + ["trace":"Exception":private]=> array(1) { [0]=> array(6) { @@ -61,7 +61,7 @@ object(Exception)#%d (7) { } } } - ["previous":"BaseException":private]=> + ["previous":"Exception":private]=> NULL } 'test' => '0' diff --git a/Zend/tests/037.phpt b/Zend/tests/037.phpt index bda491d7e61dd..ca96f867c006e 100644 --- a/Zend/tests/037.phpt +++ b/Zend/tests/037.phpt @@ -16,7 +16,7 @@ var_dump($x::$x); --EXPECTF-- int(1) -Fatal error: Uncaught exception 'EngineException' with message 'Access to undeclared static property: Closure::$x' in %s:%d +Fatal error: Uncaught exception 'Error' with message 'Access to undeclared static property: Closure::$x' in %s:%d Stack trace: #0 {main} thrown in %s on line %d diff --git a/Zend/tests/access_modifiers_010.phpt b/Zend/tests/access_modifiers_010.phpt index 5fd65e5bef3cf..07a1b594deb16 100644 --- a/Zend/tests/access_modifiers_010.phpt +++ b/Zend/tests/access_modifiers_010.phpt @@ -28,7 +28,7 @@ new c; ?> --EXPECTF-- -Fatal error: Uncaught exception 'EngineException' with message 'Call to private method d::test2() from context 'a'' in %s:%d +Fatal error: Uncaught exception 'Error' with message 'Call to private method d::test2() from context 'a'' in %s:%d Stack trace: #0 %s(%d): a->test() #1 %s(%d): c->__construct() diff --git a/Zend/tests/add_002.phpt b/Zend/tests/add_002.phpt index a242f7543eddc..5d35f55723fbf 100644 --- a/Zend/tests/add_002.phpt +++ b/Zend/tests/add_002.phpt @@ -10,7 +10,7 @@ $o->prop = "value"; try { var_dump($a + $o); -} catch (EngineException $e) { +} catch (Error $e) { echo "\nException: " . $e->getMessage() . "\n"; } @@ -26,7 +26,7 @@ Exception: Unsupported operand types Notice: Object of class stdClass could not be converted to int in %s on line %d -Fatal error: Uncaught exception 'EngineException' with message 'Unsupported operand types' in %s:%d +Fatal error: Uncaught exception 'Error' with message 'Unsupported operand types' in %s:%d Stack trace: #0 {main} thrown in %s on line %d diff --git a/Zend/tests/add_003.phpt b/Zend/tests/add_003.phpt index 4023e24c2a587..6921d72651757 100644 --- a/Zend/tests/add_003.phpt +++ b/Zend/tests/add_003.phpt @@ -10,7 +10,7 @@ $o->prop = "value"; try { var_dump($o + $a); -} catch (EngineException $e) { +} catch (Error $e) { echo "\nException: " . $e->getMessage() . "\n"; } @@ -26,7 +26,7 @@ Exception: Unsupported operand types Notice: Object of class stdClass could not be converted to int in %s on line %d -Fatal error: Uncaught exception 'EngineException' with message 'Unsupported operand types' in %s:%d +Fatal error: Uncaught exception 'Error' with message 'Unsupported operand types' in %s:%d Stack trace: #0 {main} thrown in %s on line %d diff --git a/Zend/tests/add_004.phpt b/Zend/tests/add_004.phpt index b0a10f82f32c9..c0c390faefca1 100644 --- a/Zend/tests/add_004.phpt +++ b/Zend/tests/add_004.phpt @@ -7,7 +7,7 @@ $a = array(1,2,3); try { var_dump($a + 5); -} catch (EngineException $e) { +} catch (Error $e) { echo "\nException: " . $e->getMessage() . "\n"; } @@ -19,7 +19,7 @@ echo "Done\n"; --EXPECTF-- Exception: Unsupported operand types -Fatal error: Uncaught exception 'EngineException' with message 'Unsupported operand types' in %s:%d +Fatal error: Uncaught exception 'Error' with message 'Unsupported operand types' in %s:%d Stack trace: #0 {main} thrown in %s on line %d diff --git a/Zend/tests/add_007.phpt b/Zend/tests/add_007.phpt index 455f664dfaa21..562dd3e642b63 100644 --- a/Zend/tests/add_007.phpt +++ b/Zend/tests/add_007.phpt @@ -9,7 +9,7 @@ $s1 = "some string"; try { var_dump($a + $s1); -} catch (EngineException $e) { +} catch (Error $e) { echo "\nException: " . $e->getMessage() . "\n"; } @@ -21,7 +21,7 @@ echo "Done\n"; --EXPECTF-- Exception: Unsupported operand types -Fatal error: Uncaught exception 'EngineException' with message 'Unsupported operand types' in %s:%d +Fatal error: Uncaught exception 'Error' with message 'Unsupported operand types' in %s:%d Stack trace: #0 {main} thrown in %s on line %d diff --git a/Zend/tests/arg_unpack/string_keys.phpt b/Zend/tests/arg_unpack/string_keys.phpt index 51db52e146111..e448a417f65fa 100644 --- a/Zend/tests/arg_unpack/string_keys.phpt +++ b/Zend/tests/arg_unpack/string_keys.phpt @@ -9,12 +9,12 @@ set_error_handler(function($errno, $errstr) { try { var_dump(...[1, 2, "foo" => 3, 4]); -} catch (EngineException $ex) { +} catch (Error $ex) { var_dump($ex->getMessage()); } try { var_dump(...new ArrayIterator([1, 2, "foo" => 3, 4])); -} catch (EngineException $ex) { +} catch (Error $ex) { var_dump($ex->getMessage()); } diff --git a/Zend/tests/bug24773.phpt b/Zend/tests/bug24773.phpt index ea08f84c263be..a87ab2ebceef2 100644 --- a/Zend/tests/bug24773.phpt +++ b/Zend/tests/bug24773.phpt @@ -6,7 +6,7 @@ Bug #24773 (unset() of integers treated as arrays causes a crash) unset($array["lvl1"]["lvl2"]["b"]); ?> --EXPECTF-- -Fatal error: Uncaught exception 'EngineException' with message 'Cannot use string offset as an array' in %s:%d +Fatal error: Uncaught exception 'Error' with message 'Cannot use string offset as an array' in %s:%d Stack trace: #0 {main} thrown in %s on line %d diff --git a/Zend/tests/bug26166.phpt b/Zend/tests/bug26166.phpt index 60624ed98ef78..9e31efa44259f 100644 --- a/Zend/tests/bug26166.phpt +++ b/Zend/tests/bug26166.phpt @@ -37,25 +37,25 @@ function my_error_handler($errno, $errstr, $errfile, $errline) { set_error_handler('my_error_handler'); -class None +class NoneTest { function __toString() { } } -$o = new None; +$o = new NoneTest; echo $o; echo "===THROW===\n"; -class Error +class ErrorTest { function __toString() { throw new Exception("This is an error!"); } } -$o = new Error; +$o = new ErrorTest; try { echo $o; } @@ -68,7 +68,7 @@ catch (Exception $e) { --EXPECTF-- Hello World! ===NONE=== -string(52) "Method None::__toString() must return a string value" +string(56) "Method NoneTest::__toString() must return a string value" ===THROW=== -Fatal error: Method Error::__toString() must not throw an exception in %sbug26166.php on line %d +Fatal error: Method ErrorTest::__toString() must not throw an exception in %sbug26166.php on line %d diff --git a/Zend/tests/bug29015.phpt b/Zend/tests/bug29015.phpt index f5a4e0ac412c4..19c9206fe28ea 100644 --- a/Zend/tests/bug29015.phpt +++ b/Zend/tests/bug29015.phpt @@ -8,7 +8,7 @@ $a->$x = "string('')"; var_dump($a); ?> --EXPECTF-- -Fatal error: Uncaught exception 'EngineException' with message 'Cannot access empty property' in %sbug29015.php:4 +Fatal error: Uncaught exception 'Error' with message 'Cannot access empty property' in %sbug29015.php:4 Stack trace: #0 {main} thrown in %sbug29015.php on line 4 diff --git a/Zend/tests/bug29674.phpt b/Zend/tests/bug29674.phpt index f94c2290b4e11..ed0cee6eb9c5e 100644 --- a/Zend/tests/bug29674.phpt +++ b/Zend/tests/bug29674.phpt @@ -38,7 +38,7 @@ NULL ===CHILD=== string(4) "Base" -Fatal error: Uncaught exception 'EngineException' with message 'Cannot access private property ChildClass::$private_child' in %sbug29674.php:%d +Fatal error: Uncaught exception 'Error' with message 'Cannot access private property ChildClass::$private_child' in %sbug29674.php:%d Stack trace: #0 %s(%d): BaseClass->printVars() #1 {main} diff --git a/Zend/tests/bug31102.phpt b/Zend/tests/bug31102.phpt index 0dbfd5a34f6f3..aaff58d07eedc 100644 --- a/Zend/tests/bug31102.phpt +++ b/Zend/tests/bug31102.phpt @@ -45,7 +45,7 @@ __autoload(Test2,2) Caught: __autoload __autoload(Test3,3) -Fatal error: Uncaught exception 'EngineException' with message 'Class 'Test3' not found' in %sbug31102.php(%d) : eval()'d code:1 +Fatal error: Uncaught exception 'Error' with message 'Class 'Test3' not found' in %sbug31102.php(%d) : eval()'d code:1 Stack trace: #0 %s(%d): eval() #1 {main} diff --git a/Zend/tests/bug32660.phpt b/Zend/tests/bug32660.phpt index d99e2f8e14c54..d3c1bf841c5f6 100644 --- a/Zend/tests/bug32660.phpt +++ b/Zend/tests/bug32660.phpt @@ -36,7 +36,7 @@ A Object Notice: Indirect modification of overloaded property A::$whatever has no effect in %sbug32660.php on line 23 -Fatal error: Uncaught exception 'EngineException' with message 'Cannot assign by reference to overloaded object' in %sbug32660.php:23 +Fatal error: Uncaught exception 'Error' with message 'Cannot assign by reference to overloaded object' in %sbug32660.php:23 Stack trace: #0 {main} thrown in %sbug32660.php on line 23 diff --git a/Zend/tests/bug33318.phpt b/Zend/tests/bug33318.phpt index 4abb90866fae8..96c60d65d7ae6 100644 --- a/Zend/tests/bug33318.phpt +++ b/Zend/tests/bug33318.phpt @@ -5,7 +5,7 @@ Bug #33318 (throw 1; results in Invalid opcode 108/1/8) throw 1; ?> --EXPECTF-- -Fatal error: Uncaught exception 'EngineException' with message 'Can only throw objects' in %sbug33318.php:2 +Fatal error: Uncaught exception 'Error' with message 'Can only throw objects' in %sbug33318.php:2 Stack trace: #0 {main} thrown in %sbug33318.php on line 2 \ No newline at end of file diff --git a/Zend/tests/bug34064.phpt b/Zend/tests/bug34064.phpt index 91ee3e6f81020..bc4ba20e8d873 100644 --- a/Zend/tests/bug34064.phpt +++ b/Zend/tests/bug34064.phpt @@ -31,7 +31,7 @@ array(1) { string(2) "ok" } -Fatal error: Uncaught exception 'EngineException' with message 'Cannot use [] for reading' in %sbug34064.php:18 +Fatal error: Uncaught exception 'Error' with message 'Cannot use [] for reading' in %sbug34064.php:18 Stack trace: #0 %s(%d): XmlTest->run() #1 {main} diff --git a/Zend/tests/bug36071.phpt b/Zend/tests/bug36071.phpt index 918cea83b2608..7826e58423116 100644 --- a/Zend/tests/bug36071.phpt +++ b/Zend/tests/bug36071.phpt @@ -8,7 +8,7 @@ $a = clone 0; $a[0]->b = 0; ?> --EXPECTF-- -Fatal error: Uncaught exception 'EngineException' with message '__clone method called on non-object' in %sbug36071.php:2 +Fatal error: Uncaught exception 'Error' with message '__clone method called on non-object' in %sbug36071.php:2 Stack trace: #0 {main} thrown in %sbug36071.php on line 2 \ No newline at end of file diff --git a/Zend/tests/bug36268.phpt b/Zend/tests/bug36268.phpt index ad652ce01524f..0bb3910ce8c28 100644 --- a/Zend/tests/bug36268.phpt +++ b/Zend/tests/bug36268.phpt @@ -11,7 +11,7 @@ $x = new Foo(); bar(); ?> --EXPECTF-- -Fatal error: Uncaught exception 'EngineException' with message 'Call to undefined function bar()' in %sbug36268.php:8 +Fatal error: Uncaught exception 'Error' with message 'Call to undefined function bar()' in %sbug36268.php:8 Stack trace: #0 {main} thrown in %sbug36268.php on line 8 diff --git a/Zend/tests/bug37251.phpt b/Zend/tests/bug37251.phpt index 2b545a530f50d..12d1e3d974c90 100644 --- a/Zend/tests/bug37251.phpt +++ b/Zend/tests/bug37251.phpt @@ -10,7 +10,7 @@ class Foo { try { $foo = new Foo(); $foo->bar(); -} catch (EngineException $e) { +} catch (Error $e) { echo 'OK'; } --EXPECT-- diff --git a/Zend/tests/bug37632.phpt b/Zend/tests/bug37632.phpt index 974471ffd3ef2..1c6b43567c955 100644 --- a/Zend/tests/bug37632.phpt +++ b/Zend/tests/bug37632.phpt @@ -132,7 +132,7 @@ B2::doTest C2::test B4::doTest -Fatal error: Uncaught exception 'EngineException' with message 'Call to protected C4::__construct() from context 'B4'' in %sbug37632.php:%d +Fatal error: Uncaught exception 'Error' with message 'Call to protected C4::__construct() from context 'B4'' in %sbug37632.php:%d Stack trace: #0 %s(%d): B4::doTest() #1 {main} diff --git a/Zend/tests/bug40621.phpt b/Zend/tests/bug40621.phpt index 3180c8c921f9f..04b76c5f69220 100644 --- a/Zend/tests/bug40621.phpt +++ b/Zend/tests/bug40621.phpt @@ -17,7 +17,7 @@ echo "Done\n"; --EXPECTF-- Deprecated: Non-static method Foo::get() should not be called statically in %s on line %d -Fatal error: Uncaught exception 'EngineException' with message 'Non-static method Foo::__construct() cannot be called statically' in %s:%d +Fatal error: Uncaught exception 'Error' with message 'Non-static method Foo::__construct() cannot be called statically' in %s:%d Stack trace: #0 %s(%d): Foo::get() #1 {main} diff --git a/Zend/tests/bug41633_2.phpt b/Zend/tests/bug41633_2.phpt index d64092c691fea..ea122d7c48464 100644 --- a/Zend/tests/bug41633_2.phpt +++ b/Zend/tests/bug41633_2.phpt @@ -8,7 +8,7 @@ class Foo { echo Foo::A."\n"; ?> --EXPECTF-- -Fatal error: Uncaught exception 'EngineException' with message 'Undefined class constant 'self::B'' in %sbug41633_2.php:5 +Fatal error: Uncaught exception 'Error' with message 'Undefined class constant 'self::B'' in %sbug41633_2.php:5 Stack trace: #0 {main} thrown in %sbug41633_2.php on line 5 diff --git a/Zend/tests/bug41633_3.phpt b/Zend/tests/bug41633_3.phpt index bf0e95db8101e..3750926742583 100644 --- a/Zend/tests/bug41633_3.phpt +++ b/Zend/tests/bug41633_3.phpt @@ -9,7 +9,7 @@ class Foo { echo Foo::A; ?> --EXPECTF-- -Fatal error: Uncaught exception 'EngineException' with message 'Cannot declare self-referencing constant 'Foo::B'' in %sbug41633_3.php:%d +Fatal error: Uncaught exception 'Error' with message 'Cannot declare self-referencing constant 'Foo::B'' in %sbug41633_3.php:%d Stack trace: #0 {main} thrown in %sbug41633_3.php on line %d diff --git a/Zend/tests/bug41813.phpt b/Zend/tests/bug41813.phpt index 5c52051692452..27d616399dad8 100644 --- a/Zend/tests/bug41813.phpt +++ b/Zend/tests/bug41813.phpt @@ -9,7 +9,7 @@ $foo[0]->bar = "xyz"; echo "Done\n"; ?> --EXPECTF-- -Fatal error: Uncaught exception 'EngineException' with message 'Cannot use string offset as an array' in %s:%d +Fatal error: Uncaught exception 'Error' with message 'Cannot use string offset as an array' in %s:%d Stack trace: #0 {main} thrown in %s on line %d diff --git a/Zend/tests/bug41919.phpt b/Zend/tests/bug41919.phpt index 4b872b486765c..6ac89ffd4dce2 100644 --- a/Zend/tests/bug41919.phpt +++ b/Zend/tests/bug41919.phpt @@ -8,7 +8,7 @@ $foo[3]->bar[1] = "bang"; echo "ok\n"; ?> --EXPECTF-- -Fatal error: Uncaught exception 'EngineException' with message 'Cannot use string offset as an object' in %sbug41919.php:%d +Fatal error: Uncaught exception 'Error' with message 'Cannot use string offset as an object' in %sbug41919.php:%d Stack trace: #0 {main} thrown in %sbug41919.php on line %d diff --git a/Zend/tests/bug42817.phpt b/Zend/tests/bug42817.phpt index 46d01170a7dbd..ea20999c21217 100644 --- a/Zend/tests/bug42817.phpt +++ b/Zend/tests/bug42817.phpt @@ -6,7 +6,7 @@ $a = clone(null); array_push($a->b, $c); ?> --EXPECTF-- -Fatal error: Uncaught exception 'EngineException' with message '__clone method called on non-object' in %sbug42817.php:2 +Fatal error: Uncaught exception 'Error' with message '__clone method called on non-object' in %sbug42817.php:2 Stack trace: #0 {main} thrown in %sbug42817.php on line 2 diff --git a/Zend/tests/bug42818.phpt b/Zend/tests/bug42818.phpt index ea83ced5fc905..0795abbad715e 100644 --- a/Zend/tests/bug42818.phpt +++ b/Zend/tests/bug42818.phpt @@ -5,7 +5,7 @@ Bug #42818 ($foo = clone(array()); leaks memory) $foo = clone(array()); ?> --EXPECTF-- -Fatal error: Uncaught exception 'EngineException' with message '__clone method called on non-object' in %sbug42818.php:2 +Fatal error: Uncaught exception 'Error' with message '__clone method called on non-object' in %sbug42818.php:2 Stack trace: #0 {main} thrown in %sbug42818.php on line 2 diff --git a/Zend/tests/bug42819.phpt b/Zend/tests/bug42819.phpt index e6bdba715b13c..20a182e100b7e 100644 --- a/Zend/tests/bug42819.phpt +++ b/Zend/tests/bug42819.phpt @@ -299,7 +299,7 @@ Array [1] => 1 ) -Fatal error: Uncaught exception 'EngineException' with message 'Undefined constant 'foo\foo\unknown'' in %sbug42819.php:%d +Fatal error: Uncaught exception 'Error' with message 'Undefined constant 'foo\foo\unknown'' in %sbug42819.php:%d Stack trace: #0 %s(%d): foo\oops() #1 {main} diff --git a/Zend/tests/bug42937.phpt b/Zend/tests/bug42937.phpt index 53e6fe7f492a4..6de7aef1374e3 100644 --- a/Zend/tests/bug42937.phpt +++ b/Zend/tests/bug42937.phpt @@ -39,7 +39,7 @@ test3 test4 test5 -Fatal error: Uncaught exception 'EngineException' with message 'Call to undefined method C::test6()' in %sbug42937.php:21 +Fatal error: Uncaught exception 'Error' with message 'Call to undefined method C::test6()' in %sbug42937.php:21 Stack trace: #0 %s(%d): B->test() #1 {main} diff --git a/Zend/tests/bug43344_10.phpt b/Zend/tests/bug43344_10.phpt index 67508d0d69ccd..439199fd72db1 100644 --- a/Zend/tests/bug43344_10.phpt +++ b/Zend/tests/bug43344_10.phpt @@ -5,7 +5,7 @@ Bug #43344.10 (Wrong error message for undefined namespace constant) echo namespace\bar."\n"; ?> --EXPECTF-- -Fatal error: Uncaught exception 'EngineException' with message 'Undefined constant 'bar'' in %sbug43344_10.php:%d +Fatal error: Uncaught exception 'Error' with message 'Undefined constant 'bar'' in %sbug43344_10.php:%d Stack trace: #0 {main} thrown in %sbug43344_10.php on line %d diff --git a/Zend/tests/bug43344_11.phpt b/Zend/tests/bug43344_11.phpt index d7c51e6361d49..cfbaa62cd35ab 100644 --- a/Zend/tests/bug43344_11.phpt +++ b/Zend/tests/bug43344_11.phpt @@ -8,7 +8,7 @@ function f($a=namespace\bar) { echo f()."\n"; ?> --EXPECTF-- -Fatal error: Uncaught exception 'EngineException' with message 'Undefined constant 'bar'' in %sbug43344_11.php:%d +Fatal error: Uncaught exception 'Error' with message 'Undefined constant 'bar'' in %sbug43344_11.php:%d Stack trace: #0 %s(%d): f() #1 {main} diff --git a/Zend/tests/bug43344_12.phpt b/Zend/tests/bug43344_12.phpt index 1d14d4b40bede..7cf1c915bb436 100644 --- a/Zend/tests/bug43344_12.phpt +++ b/Zend/tests/bug43344_12.phpt @@ -8,7 +8,7 @@ function f($a=array(namespace\bar)) { echo f()."\n"; ?> --EXPECTF-- -Fatal error: Uncaught exception 'EngineException' with message 'Undefined constant 'bar'' in %sbug43344_12.php:%d +Fatal error: Uncaught exception 'Error' with message 'Undefined constant 'bar'' in %sbug43344_12.php:%d Stack trace: #0 %s(%d): f() #1 {main} diff --git a/Zend/tests/bug43344_13.phpt b/Zend/tests/bug43344_13.phpt index 83d79864d1f78..4a7b57de6070d 100644 --- a/Zend/tests/bug43344_13.phpt +++ b/Zend/tests/bug43344_13.phpt @@ -9,7 +9,7 @@ function f($a=array(namespace\bar=>0)) { echo f()."\n"; ?> --EXPECTF-- -Fatal error: Uncaught exception 'EngineException' with message 'Undefined constant 'bar'' in %sbug43344_13.php:%d +Fatal error: Uncaught exception 'Error' with message 'Undefined constant 'bar'' in %sbug43344_13.php:%d Stack trace: #0 %s(%d): f() #1 {main} diff --git a/Zend/tests/bug43344_2.phpt b/Zend/tests/bug43344_2.phpt index 094672f3d16fc..05a379956d3a7 100644 --- a/Zend/tests/bug43344_2.phpt +++ b/Zend/tests/bug43344_2.phpt @@ -6,7 +6,7 @@ namespace Foo; echo Foo::bar."\n"; ?> --EXPECTF-- -Fatal error: Uncaught exception 'EngineException' with message 'Class 'Foo\Foo' not found' in %sbug43344_2.php:%d +Fatal error: Uncaught exception 'Error' with message 'Class 'Foo\Foo' not found' in %sbug43344_2.php:%d Stack trace: #0 {main} thrown in %sbug43344_2.php on line %d diff --git a/Zend/tests/bug43344_6.phpt b/Zend/tests/bug43344_6.phpt index ef9eb58867236..b14edbadb643c 100644 --- a/Zend/tests/bug43344_6.phpt +++ b/Zend/tests/bug43344_6.phpt @@ -6,7 +6,7 @@ namespace Foo; echo namespace\bar."\n"; ?> --EXPECTF-- -Fatal error: Uncaught exception 'EngineException' with message 'Undefined constant 'Foo\bar'' in %sbug43344_6.php:%d +Fatal error: Uncaught exception 'Error' with message 'Undefined constant 'Foo\bar'' in %sbug43344_6.php:%d Stack trace: #0 {main} thrown in %sbug43344_6.php on line %d diff --git a/Zend/tests/bug43344_7.phpt b/Zend/tests/bug43344_7.phpt index 661e93aea817e..6b5b914e34653 100644 --- a/Zend/tests/bug43344_7.phpt +++ b/Zend/tests/bug43344_7.phpt @@ -9,7 +9,7 @@ function f($a=namespace\bar) { echo f()."\n"; ?> --EXPECTF-- -Fatal error: Uncaught exception 'EngineException' with message 'Undefined constant 'Foo\bar'' in %sbug43344_7.php:%d +Fatal error: Uncaught exception 'Error' with message 'Undefined constant 'Foo\bar'' in %sbug43344_7.php:%d Stack trace: #0 %s(%d): Foo\f() #1 {main} diff --git a/Zend/tests/bug43344_8.phpt b/Zend/tests/bug43344_8.phpt index 14aeb7d8afacd..2d8b8b0421043 100644 --- a/Zend/tests/bug43344_8.phpt +++ b/Zend/tests/bug43344_8.phpt @@ -9,7 +9,7 @@ function f($a=array(namespace\bar)) { echo f()."\n"; ?> --EXPECTF-- -Fatal error: Uncaught exception 'EngineException' with message 'Undefined constant 'Foo\bar'' in %sbug43344_8.php:%d +Fatal error: Uncaught exception 'Error' with message 'Undefined constant 'Foo\bar'' in %sbug43344_8.php:%d Stack trace: #0 %s(%d): Foo\f() #1 {main} diff --git a/Zend/tests/bug43344_9.phpt b/Zend/tests/bug43344_9.phpt index 0642dc545a731..533db85b53353 100644 --- a/Zend/tests/bug43344_9.phpt +++ b/Zend/tests/bug43344_9.phpt @@ -10,7 +10,7 @@ function f($a=array(namespace\bar=>0)) { echo f()."\n"; ?> --EXPECTF-- -Fatal error: Uncaught exception 'EngineException' with message 'Undefined constant 'Foo\bar'' in %sbug43344_9.php:%d +Fatal error: Uncaught exception 'Error' with message 'Undefined constant 'Foo\bar'' in %sbug43344_9.php:%d Stack trace: #0 %s(%d): Foo\f() #1 {main} diff --git a/Zend/tests/bug44141.phpt b/Zend/tests/bug44141.phpt index aa0ae7ed4b458..d3fe17b35d7d0 100644 --- a/Zend/tests/bug44141.phpt +++ b/Zend/tests/bug44141.phpt @@ -22,7 +22,7 @@ class Y extends X $y = Y::cheat(5); echo $y->x, PHP_EOL; --EXPECTF-- -Fatal error: Uncaught exception 'EngineException' with message 'Call to private X::__construct() from context 'Y'' in %sbug44141.php:15 +Fatal error: Uncaught exception 'Error' with message 'Call to private X::__construct() from context 'Y'' in %sbug44141.php:15 Stack trace: #0 %s(%d): Y::cheat(5) #1 {main} diff --git a/Zend/tests/bug46304.phpt b/Zend/tests/bug46304.phpt index 43f28775e5f32..e14ec7af4dcdd 100644 --- a/Zend/tests/bug46304.phpt +++ b/Zend/tests/bug46304.phpt @@ -62,7 +62,7 @@ value6 value6 value6 -Fatal error: Uncaught exception 'EngineException' with message 'Undefined constant 'NS1\ns2\coNSt1'' in %sbug46304.php:%d +Fatal error: Uncaught exception 'Error' with message 'Undefined constant 'NS1\ns2\coNSt1'' in %sbug46304.php:%d Stack trace: #0 {main} thrown in %sbug46304.php on line %d diff --git a/Zend/tests/bug46381.phpt b/Zend/tests/bug46381.phpt index c6484a00f5e61..f617ebca612a6 100644 --- a/Zend/tests/bug46381.phpt +++ b/Zend/tests/bug46381.phpt @@ -14,7 +14,7 @@ $test->method(); echo "Done\n"; ?> --EXPECTF-- -Fatal error: Uncaught exception 'EngineException' with message 'Non-static method ArrayIterator::current() cannot be called statically' in %s:%d +Fatal error: Uncaught exception 'Error' with message 'Non-static method ArrayIterator::current() cannot be called statically' in %s:%d Stack trace: #0 %s(%d): test->method() #1 {main} diff --git a/Zend/tests/bug47054.phpt b/Zend/tests/bug47054.phpt index 378cae9ba514e..fdbff823a20fb 100644 --- a/Zend/tests/bug47054.phpt +++ b/Zend/tests/bug47054.phpt @@ -36,7 +36,7 @@ Warning: get_called_class() called from outside a class in %s on line %d Deprecated: Non-static method D::m() should not be called statically in %s on line %d -Fatal error: Uncaught exception 'EngineException' with message 'Using $this when not in object context' in %s:%d +Fatal error: Uncaught exception 'Error' with message 'Using $this when not in object context' in %s:%d Stack trace: #0 %s(%d): D::m() #1 {main} diff --git a/Zend/tests/bug47699.phpt b/Zend/tests/bug47699.phpt index 6e96c5bb31f6b..3291e5873510a 100644 --- a/Zend/tests/bug47699.phpt +++ b/Zend/tests/bug47699.phpt @@ -15,7 +15,7 @@ new X(); ?> --EXPECTF-- BB -Fatal error: Uncaught exception 'EngineException' with message 'Class 'X' not found' in %sbug47699.php:%d +Fatal error: Uncaught exception 'Error' with message 'Class 'X' not found' in %sbug47699.php:%d Stack trace: #0 {main} thrown in %sbug47699.php on line %d diff --git a/Zend/tests/bug47704.phpt b/Zend/tests/bug47704.phpt index db51d9eb20a00..e2e6ceb959aca 100644 --- a/Zend/tests/bug47704.phpt +++ b/Zend/tests/bug47704.phpt @@ -6,7 +6,7 @@ $s = "abd"; $s[0]->a += 1; ?> --EXPECTF-- -Fatal error: Uncaught exception 'EngineException' with message 'Cannot use string offset as an object' in %sbug47704.php:%d +Fatal error: Uncaught exception 'Error' with message 'Cannot use string offset as an object' in %sbug47704.php:%d Stack trace: #0 {main} thrown in %sbug47704.php on line %d diff --git a/Zend/tests/bug48215_2.phpt b/Zend/tests/bug48215_2.phpt index aac5bfd5e27c2..7db4b9c4926a6 100644 --- a/Zend/tests/bug48215_2.phpt +++ b/Zend/tests/bug48215_2.phpt @@ -16,7 +16,7 @@ $c = new c(); ?> ===DONE=== --EXPECTF-- -Fatal error: Uncaught exception 'EngineException' with message 'Call to undefined method b::b()' in %s:%d +Fatal error: Uncaught exception 'Error' with message 'Call to undefined method b::b()' in %s:%d Stack trace: #0 %s(%d): c->__construct() #1 {main} diff --git a/Zend/tests/bug48693.phpt b/Zend/tests/bug48693.phpt index d2baf2a695c2e..cb6beb3a3dfce 100644 --- a/Zend/tests/bug48693.phpt +++ b/Zend/tests/bug48693.phpt @@ -5,22 +5,22 @@ Bug #48693 (Double declaration of __lambda_func when lambda wrongly formatted) try { $x = create_function('', 'return 1; }'); -} catch (ParseException $e) { +} catch (ParseError $e) { echo "$e\n\n"; } try { $y = create_function('', 'function a() { }; return 2;'); -} catch (ParseException $e) { +} catch (ParseError $e) { echo "$e\n\n"; } try { $z = create_function('', '{'); -} catch (ParseException $e) { +} catch (ParseError $e) { echo "$e\n\n"; } try { $w = create_function('', 'return 3;'); -} catch (ParseException $e) { +} catch (ParseError $e) { echo "$e\n\n"; } @@ -31,12 +31,12 @@ var_dump( ?> --EXPECTF-- -exception 'ParseException' with message 'syntax error, unexpected '}', expecting end of file' in %sbug48693.php(4) : runtime-created function:1 +exception 'ParseError' with message 'syntax error, unexpected '}', expecting end of file' in %sbug48693.php(4) : runtime-created function:1 Stack trace: #0 %sbug48693.php(4): create_function('', 'return 1; }') #1 {main} -exception 'ParseException' with message 'syntax error, unexpected end of file' in %sbug48693.php(14) : runtime-created function:1 +exception 'ParseError' with message 'syntax error, unexpected end of file' in %sbug48693.php(14) : runtime-created function:1 Stack trace: #0 %sbug48693.php(14): create_function('', '{') #1 {main} diff --git a/Zend/tests/bug49866.phpt b/Zend/tests/bug49866.phpt index 047a162953cbe..28198e0e60759 100644 --- a/Zend/tests/bug49866.phpt +++ b/Zend/tests/bug49866.phpt @@ -7,7 +7,7 @@ $b = &$a[1]; $b = "f"; echo $a; --EXPECTF-- -Fatal error: Uncaught exception 'EngineException' with message 'Cannot create references to/from string offsets nor overloaded objects' in %sbug49866.php:3 +Fatal error: Uncaught exception 'Error' with message 'Cannot create references to/from string offsets nor overloaded objects' in %sbug49866.php:3 Stack trace: #0 {main} thrown in %sbug49866.php on line 3 diff --git a/Zend/tests/bug50146.phpt b/Zend/tests/bug50146.phpt index f6cdb796dd84b..f5871f726db03 100644 --- a/Zend/tests/bug50146.phpt +++ b/Zend/tests/bug50146.phpt @@ -17,7 +17,7 @@ var_dump(isset($obj->a)); bool(false) bool(false) -Fatal error: Uncaught exception 'EngineException' with message 'Closure object cannot have properties' in %s:%d +Fatal error: Uncaught exception 'Error' with message 'Closure object cannot have properties' in %s:%d Stack trace: #0 {main} thrown in %s on line %d diff --git a/Zend/tests/bug52484.phpt b/Zend/tests/bug52484.phpt index bf9d494aaa42c..6f053775c74d1 100644 --- a/Zend/tests/bug52484.phpt +++ b/Zend/tests/bug52484.phpt @@ -16,7 +16,7 @@ unset($a->$prop); ?> --EXPECTF-- -Fatal error: Uncaught exception 'EngineException' with message 'Cannot access empty property' in %s:%d +Fatal error: Uncaught exception 'Error' with message 'Cannot access empty property' in %s:%d Stack trace: #0 %s(%d): A->__unset('') #1 {main} diff --git a/Zend/tests/bug52484_2.phpt b/Zend/tests/bug52484_2.phpt index 3ffb2af3e9416..fa0e3fa0b2007 100644 --- a/Zend/tests/bug52484_2.phpt +++ b/Zend/tests/bug52484_2.phpt @@ -16,7 +16,7 @@ $a->$prop = 2; ?> --EXPECTF-- -Fatal error: Uncaught exception 'EngineException' with message 'Cannot access empty property' in %s:%d +Fatal error: Uncaught exception 'Error' with message 'Cannot access empty property' in %s:%d Stack trace: #0 %s(%d): A->__set('', 2) #1 {main} diff --git a/Zend/tests/bug52484_3.phpt b/Zend/tests/bug52484_3.phpt index 877b45d9e3e0a..d5518f95089ad 100644 --- a/Zend/tests/bug52484_3.phpt +++ b/Zend/tests/bug52484_3.phpt @@ -16,7 +16,7 @@ var_dump($a->$prop); ?> --EXPECTF-- -Fatal error: Uncaught exception 'EngineException' with message 'Cannot access empty property' in %s:%d +Fatal error: Uncaught exception 'Error' with message 'Cannot access empty property' in %s:%d Stack trace: #0 %s(%d): A->__get('') #1 {main} diff --git a/Zend/tests/bug61025.phpt b/Zend/tests/bug61025.phpt index 69f64d61e81bc..eb541bd7c41f1 100644 --- a/Zend/tests/bug61025.phpt +++ b/Zend/tests/bug61025.phpt @@ -24,7 +24,7 @@ Warning: The magic method __invoke() must have public visibility and cannot be s Warning: The magic method __invoke() must have public visibility and cannot be static in %sbug61025.php on line %d Bar -Fatal error: Uncaught exception 'EngineException' with message 'Call to private method Bar::__invoke() from context ''' in %sbug61025.php:%d +Fatal error: Uncaught exception 'Error' with message 'Call to private method Bar::__invoke() from context ''' in %sbug61025.php:%d Stack trace: #0 {main} thrown in %sbug61025.php on line %d diff --git a/Zend/tests/bug63111.phpt b/Zend/tests/bug63111.phpt index 92b3a5e93a36d..01550cf158195 100644 --- a/Zend/tests/bug63111.phpt +++ b/Zend/tests/bug63111.phpt @@ -31,7 +31,7 @@ bool(true) bool(true) ok -Fatal error: Uncaught exception 'EngineException' with message 'Cannot call abstract method Foo::bar()' in %sbug63111.php:20 +Fatal error: Uncaught exception 'Error' with message 'Cannot call abstract method Foo::bar()' in %sbug63111.php:20 Stack trace: #0 {main} thrown in %sbug63111.php on line 20 diff --git a/Zend/tests/bug63173.phpt b/Zend/tests/bug63173.phpt index 34d3d6e7d7b21..99fb04199d912 100644 --- a/Zend/tests/bug63173.phpt +++ b/Zend/tests/bug63173.phpt @@ -9,7 +9,7 @@ $callback(); ?> --EXPECTF-- -Fatal error: Uncaught exception 'EngineException' with message 'Array callback has to contain indices 0 and 1' in %s:%d +Fatal error: Uncaught exception 'Error' with message 'Array callback has to contain indices 0 and 1' in %s:%d Stack trace: #0 {main} thrown in %s on line %d diff --git a/Zend/tests/bug64135.phpt b/Zend/tests/bug64135.phpt index 53bcba1d0d70a..e4be3e0c6457f 100644 --- a/Zend/tests/bug64135.phpt +++ b/Zend/tests/bug64135.phpt @@ -10,7 +10,7 @@ function exception_error_handler() { set_error_handler("exception_error_handler"); try { $undefined->undefined(); -} catch(BaseException $e) { +} catch(Throwable $e) { echo "Exception is thrown"; } --EXPECT-- diff --git a/Zend/tests/bug64720.phpt b/Zend/tests/bug64720.phpt index fd71d6bdd630f..894c93c55ca8e 100644 --- a/Zend/tests/bug64720.phpt +++ b/Zend/tests/bug64720.phpt @@ -22,7 +22,7 @@ class Foo { } } -class Error { +class ErrorTest { private $trace; public function __construct() { $this->trace = debug_backtrace(1); @@ -32,11 +32,11 @@ class Error { class Bar { public function __destruct() { Stat::getInstance(); - new Error(); + new ErrorTest(); } public function test() { - new Error(); + new ErrorTest(); } } @@ -45,7 +45,7 @@ $bar = new Bar(); $bar->test(); ?> --EXPECTF-- -Fatal error: Uncaught exception 'EngineException' with message 'Access to undeclared static property: Stat::$requests' in %sbug64720.php:12 +Fatal error: Uncaught exception 'Error' with message 'Access to undeclared static property: Stat::$requests' in %sbug64720.php:12 Stack trace: #0 [internal function]: Stat->__destruct() #1 {main} diff --git a/Zend/tests/bug64966.phpt b/Zend/tests/bug64966.phpt index 931460ba6040c..f533093e60060 100644 --- a/Zend/tests/bug64966.phpt +++ b/Zend/tests/bug64966.phpt @@ -5,7 +5,7 @@ Bug #64966 (segfault in zend_do_fcall_common_helper_SPEC) function test($func) { try { $a = $func(""); - } catch (EngineException $e) { + } catch (Error $e) { throw new Exception(); } return true; diff --git a/Zend/tests/bug65784.phpt b/Zend/tests/bug65784.phpt index 2f80e93b35615..5f363fc38cb26 100644 --- a/Zend/tests/bug65784.phpt +++ b/Zend/tests/bug65784.phpt @@ -57,7 +57,7 @@ $bar = foo3(); string(9) "not catch" NULL -Fatal error: Uncaught exception 'EngineException' with message 'Class 'NotExists' not found' in %sbug65784.php:%d +Fatal error: Uncaught exception 'Error' with message 'Class 'NotExists' not found' in %sbug65784.php:%d Stack trace: #0 %s(%d): foo3() #1 {main} diff --git a/Zend/tests/bug65911.phpt b/Zend/tests/bug65911.phpt index 470d45f1f5498..c9b5eef09dced 100644 --- a/Zend/tests/bug65911.phpt +++ b/Zend/tests/bug65911.phpt @@ -17,7 +17,7 @@ $obj = new B(); $obj->go(); ?> --EXPECTF-- -Fatal error: Uncaught exception 'EngineException' with message 'Access to undeclared static property: A::$this' in %s:%d +Fatal error: Uncaught exception 'Error' with message 'Access to undeclared static property: A::$this' in %s:%d Stack trace: #0 %s(%d): B->go() #1 {main} diff --git a/Zend/tests/bug68475.phpt b/Zend/tests/bug68475.phpt index 351edb2e94386..1bf74f2603c56 100644 --- a/Zend/tests/bug68475.phpt +++ b/Zend/tests/bug68475.phpt @@ -36,7 +36,7 @@ $callback(...$args); $callback = 'TestClass::undefinedMethod'; try { $callback(); -} catch (EngineException $e) { +} catch (Error $e) { echo $e->getMessage() . "\n"; } @@ -44,7 +44,7 @@ try { $callback = 'UndefinedClass::testMethod'; try { $callback(); -} catch (EngineException $e) { +} catch (Error $e) { echo $e->getMessage() . "\n"; } ?> diff --git a/Zend/tests/bug68652.phpt b/Zend/tests/bug68652.phpt index e96a263aaaf0a..054e5e3f4c3f7 100644 --- a/Zend/tests/bug68652.phpt +++ b/Zend/tests/bug68652.phpt @@ -36,7 +36,7 @@ class Bar { $foo = new Foo(); ?> --EXPECTF-- -Fatal error: Uncaught exception 'EngineException' with message 'Access to undeclared static property: Bar::$instance' in %sbug68652.php:%d +Fatal error: Uncaught exception 'Error' with message 'Access to undeclared static property: Bar::$instance' in %sbug68652.php:%d Stack trace: #0 %s(%d): Bar::getInstance() #1 [internal function]: Foo->__destruct() diff --git a/Zend/tests/call_static_004.phpt b/Zend/tests/call_static_004.phpt index 09d28dd371383..c2f36e0f3597d 100644 --- a/Zend/tests/call_static_004.phpt +++ b/Zend/tests/call_static_004.phpt @@ -18,7 +18,7 @@ foo::$a(); --EXPECTF-- string(3) "AaA" -Fatal error: Uncaught exception 'EngineException' with message 'Function name must be a string' in %s:%d +Fatal error: Uncaught exception 'Error' with message 'Function name must be a string' in %s:%d Stack trace: #0 {main} thrown in %s on line %d diff --git a/Zend/tests/call_static_005.phpt b/Zend/tests/call_static_005.phpt index 273fc74a80711..3b8d3465f628b 100644 --- a/Zend/tests/call_static_005.phpt +++ b/Zend/tests/call_static_005.phpt @@ -12,7 +12,7 @@ class foo { try { $a = 'foo::'; $a(); -} catch (EngineException $e) { +} catch (Error $e) { echo $e->getMessage(); } diff --git a/Zend/tests/call_static_006.phpt b/Zend/tests/call_static_006.phpt index 723c65747d33f..69e3e2425fb27 100644 --- a/Zend/tests/call_static_006.phpt +++ b/Zend/tests/call_static_006.phpt @@ -27,7 +27,7 @@ ok Deprecated: Non-static method foo::aa() should not be called statically in %s on line %d ok -Fatal error: Uncaught exception 'EngineException' with message 'Cannot call constructor' in %s:%d +Fatal error: Uncaught exception 'Error' with message 'Cannot call constructor' in %s:%d Stack trace: #0 {main} thrown in %s on line %d diff --git a/Zend/tests/call_user_func_004.phpt b/Zend/tests/call_user_func_004.phpt index cc675cc400e06..f7713950f03b7 100644 --- a/Zend/tests/call_user_func_004.phpt +++ b/Zend/tests/call_user_func_004.phpt @@ -15,7 +15,7 @@ call_user_func(array('foo', 'teste')); --EXPECTF-- Deprecated: %son-static method foo::teste() should not be called statically in %s on line %d -Fatal error: Uncaught exception 'EngineException' with message 'Using $this when not in object context' in %s:%d +Fatal error: Uncaught exception 'Error' with message 'Using $this when not in object context' in %s:%d Stack trace: #0 %s(%d): foo::teste() #1 {main} diff --git a/Zend/tests/class_alias_008.phpt b/Zend/tests/class_alias_008.phpt index b294b01ac9f6d..4182654dd98ce 100644 --- a/Zend/tests/class_alias_008.phpt +++ b/Zend/tests/class_alias_008.phpt @@ -13,7 +13,7 @@ new $a; ?> --EXPECTF-- -Fatal error: Uncaught exception 'EngineException' with message 'Cannot instantiate abstract class foo' in %s:%d +Fatal error: Uncaught exception 'Error' with message 'Cannot instantiate abstract class foo' in %s:%d Stack trace: #0 {main} thrown in %s on line %d diff --git a/Zend/tests/class_alias_016.phpt b/Zend/tests/class_alias_016.phpt index 8bb1026eaffad..085abef20f8ad 100644 --- a/Zend/tests/class_alias_016.phpt +++ b/Zend/tests/class_alias_016.phpt @@ -18,7 +18,7 @@ var_dump(new foo); object(foo\bar)#%d (0) { } -Fatal error: Uncaught exception 'EngineException' with message 'Class 'foo\foo' not found' in %s:%d +Fatal error: Uncaught exception 'Error' with message 'Class 'foo\foo' not found' in %s:%d Stack trace: #0 {main} thrown in %s on line %d diff --git a/Zend/tests/class_alias_020.phpt b/Zend/tests/class_alias_020.phpt index a29f90c77dcf9..f7a30a597e3c0 100644 --- a/Zend/tests/class_alias_020.phpt +++ b/Zend/tests/class_alias_020.phpt @@ -30,7 +30,7 @@ object(foo\foo)#1 (0) { object(foo\bar\foo)#2 (0) { } -Fatal error: Uncaught exception 'EngineException' with message 'Class 'foo\bar' not found' in %s:%d +Fatal error: Uncaught exception 'Error' with message 'Class 'foo\bar' not found' in %s:%d Stack trace: #0 {main} thrown in %s on line %d diff --git a/Zend/tests/class_constants_001.phpt b/Zend/tests/class_constants_001.phpt index 8eebc58bda2cb..89d0a01538ccb 100644 --- a/Zend/tests/class_constants_001.phpt +++ b/Zend/tests/class_constants_001.phpt @@ -19,7 +19,7 @@ echo "Done\n"; string(6) "string" int(1) -Fatal error: Uncaught exception 'EngineException' with message 'Undefined class constant 'val3'' in %s:%d +Fatal error: Uncaught exception 'Error' with message 'Undefined class constant 'val3'' in %s:%d Stack trace: #0 {main} thrown in %s on line %d diff --git a/Zend/tests/class_name_as_scalar_error_005.phpt b/Zend/tests/class_name_as_scalar_error_005.phpt index 32524d11f9918..8dae871978943 100644 --- a/Zend/tests/class_name_as_scalar_error_005.phpt +++ b/Zend/tests/class_name_as_scalar_error_005.phpt @@ -7,7 +7,7 @@ $x = static::class; ?> --EXPECTF-- -Fatal error: Uncaught exception 'EngineException' with message 'Cannot use "static" when no class scope is active' in %s:3 +Fatal error: Uncaught exception 'Error' with message 'Cannot use "static" when no class scope is active' in %s:3 Stack trace: #0 {main} thrown in %s on line 3 diff --git a/Zend/tests/class_name_as_scalar_error_006.phpt b/Zend/tests/class_name_as_scalar_error_006.phpt index 954ab2e23b99f..cc62713fbd3f1 100644 --- a/Zend/tests/class_name_as_scalar_error_006.phpt +++ b/Zend/tests/class_name_as_scalar_error_006.phpt @@ -7,7 +7,7 @@ $x = parent::class; ?> --EXPECTF-- -Fatal error: Uncaught exception 'EngineException' with message 'Cannot use "parent" when no class scope is active' in %s:3 +Fatal error: Uncaught exception 'Error' with message 'Cannot use "parent" when no class scope is active' in %s:3 Stack trace: #0 {main} thrown in %s on line 3 diff --git a/Zend/tests/class_name_as_scalar_error_007.phpt b/Zend/tests/class_name_as_scalar_error_007.phpt index fac2dbeb226d7..5b51a30409ae6 100644 --- a/Zend/tests/class_name_as_scalar_error_007.phpt +++ b/Zend/tests/class_name_as_scalar_error_007.phpt @@ -7,7 +7,7 @@ var_dump(self::class); ?> --EXPECTF-- -Fatal error: Uncaught exception 'EngineException' with message 'Cannot use "self" when no class scope is active' in %s:3 +Fatal error: Uncaught exception 'Error' with message 'Cannot use "self" when no class scope is active' in %s:3 Stack trace: #0 {main} thrown in %s on line 3 diff --git a/Zend/tests/clone_001.phpt b/Zend/tests/clone_001.phpt index 9f147f9e3514d..08cf1df061b74 100644 --- a/Zend/tests/clone_001.phpt +++ b/Zend/tests/clone_001.phpt @@ -7,7 +7,7 @@ $a = clone array(); ?> --EXPECTF-- -Fatal error: Uncaught exception 'EngineException' with message '__clone method called on non-object' in %s:%d +Fatal error: Uncaught exception 'Error' with message '__clone method called on non-object' in %s:%d Stack trace: #0 {main} thrown in %s on line %d diff --git a/Zend/tests/clone_003.phpt b/Zend/tests/clone_003.phpt index 4a97c565b1a02..6656026d6456d 100644 --- a/Zend/tests/clone_003.phpt +++ b/Zend/tests/clone_003.phpt @@ -9,7 +9,7 @@ $a = clone $b; --EXPECTF-- Notice: Undefined variable: b in %s on line %d -Fatal error: Uncaught exception 'EngineException' with message '__clone method called on non-object' in %s:%d +Fatal error: Uncaught exception 'Error' with message '__clone method called on non-object' in %s:%d Stack trace: #0 {main} thrown in %s on line %d diff --git a/Zend/tests/clone_004.phpt b/Zend/tests/clone_004.phpt index 10b18fbc54fea..1e09902e93eb6 100644 --- a/Zend/tests/clone_004.phpt +++ b/Zend/tests/clone_004.phpt @@ -17,7 +17,7 @@ $a = clone $c->b[1]; ?> --EXPECTF-- -Fatal error: Uncaught exception 'EngineException' with message 'Cannot use object of type foo as array' in %s:%d +Fatal error: Uncaught exception 'Error' with message 'Cannot use object of type foo as array' in %s:%d Stack trace: #0 {main} thrown in %s on line %d diff --git a/Zend/tests/closure_005.phpt b/Zend/tests/closure_005.phpt index 0143ac173cb23..9c841155819a3 100644 --- a/Zend/tests/closure_005.phpt +++ b/Zend/tests/closure_005.phpt @@ -71,7 +71,7 @@ echo "Done\n"; 7 Destroyed -Fatal error: Uncaught exception 'EngineException' with message 'Using $this when not in object context' in %sclosure_005.php:28 +Fatal error: Uncaught exception 'Error' with message 'Using $this when not in object context' in %sclosure_005.php:28 Stack trace: #0 %s(%d): A::{closure}() #1 {main} diff --git a/Zend/tests/closure_019.phpt b/Zend/tests/closure_019.phpt index 682c7db6346c8..c46db6b80b673 100644 --- a/Zend/tests/closure_019.phpt +++ b/Zend/tests/closure_019.phpt @@ -26,7 +26,7 @@ int(9) Notice: Only variable references should be returned by reference in %sclosure_019.php on line 4 int(81) -Fatal error: Uncaught exception 'EngineException' with message 'Cannot pass parameter 1 by reference' in %s:%d +Fatal error: Uncaught exception 'Error' with message 'Cannot pass parameter 1 by reference' in %s:%d Stack trace: #0 %s(%d): test() #1 {main} diff --git a/Zend/tests/closure_020.phpt b/Zend/tests/closure_020.phpt index edc9659ca1374..ad88d28cb58cb 100644 --- a/Zend/tests/closure_020.phpt +++ b/Zend/tests/closure_020.phpt @@ -40,7 +40,7 @@ object(foo)#%d (2) { bool(true) bool(true) -Fatal error: Uncaught exception 'EngineException' with message 'Cannot access private property foo::$test' in %s:%d +Fatal error: Uncaught exception 'Error' with message 'Cannot access private property foo::$test' in %s:%d Stack trace: #0 {main} thrown in %s on line %d diff --git a/Zend/tests/closure_022.phpt b/Zend/tests/closure_022.phpt index 55f1ff5a8d3ff..70cc74177fae6 100644 --- a/Zend/tests/closure_022.phpt +++ b/Zend/tests/closure_022.phpt @@ -8,7 +8,7 @@ $foo = function() use ($a) { $foo->a = 1; ?> --EXPECTF-- -Fatal error: Uncaught exception 'EngineException' with message 'Closure object cannot have properties' in %sclosure_022.php:5 +Fatal error: Uncaught exception 'Error' with message 'Closure object cannot have properties' in %sclosure_022.php:5 Stack trace: #0 {main} thrown in %sclosure_022.php on line 5 diff --git a/Zend/tests/closure_031.phpt b/Zend/tests/closure_031.phpt index 6b4586e8b0c31..241ddb42cd555 100644 --- a/Zend/tests/closure_031.phpt +++ b/Zend/tests/closure_031.phpt @@ -10,7 +10,7 @@ $foo = function() { }; try { var_dump($foo->a); -} catch (EngineException $ex) { +} catch (Error $ex) { echo "Error: {$ex->getMessage()}\n"; } ?> diff --git a/Zend/tests/closure_033.phpt b/Zend/tests/closure_033.phpt index bc7eb88b2f0b9..39b213ddf18ea 100644 --- a/Zend/tests/closure_033.phpt +++ b/Zend/tests/closure_033.phpt @@ -25,7 +25,7 @@ $o->func(); --EXPECTF-- Test::{closure}() -Fatal error: Uncaught exception 'EngineException' with message 'Call to private method Test::func() from context ''' in %sclosure_033.php:%d +Fatal error: Uncaught exception 'Error' with message 'Call to private method Test::func() from context ''' in %sclosure_033.php:%d Stack trace: #0 {main} thrown in %sclosure_033.php on line %d diff --git a/Zend/tests/closure_038.phpt b/Zend/tests/closure_038.phpt index b1e940687295b..6b9acfef69de4 100644 --- a/Zend/tests/closure_038.phpt +++ b/Zend/tests/closure_038.phpt @@ -55,17 +55,17 @@ Testing with scope as string int(23) int(24) -Fatal error: Uncaught exception 'EngineException' with message 'Cannot access private property B::$x' in %s:%d +Fatal error: Uncaught exception 'Error' with message 'Cannot access private property B::$x' in %s:%d Stack trace: #0 %s(%d): Closure->{closure}() #1 {main} -Next exception 'EngineException' with message 'Cannot access private property B::$x' in %s:%d +Next exception 'Error' with message 'Cannot access private property B::$x' in %s:%d Stack trace: #0 %s(%d): Closure->{closure}() #1 {main} -Next exception 'EngineException' with message 'Cannot access private property B::$x' in %s:%d +Next exception 'Error' with message 'Cannot access private property B::$x' in %s:%d Stack trace: #0 %s(%d): Closure->{closure}() #1 {main} diff --git a/Zend/tests/closure_039.phpt b/Zend/tests/closure_039.phpt index 9e5ecbd21bfa0..e8f7f820b07d7 100644 --- a/Zend/tests/closure_039.phpt +++ b/Zend/tests/closure_039.phpt @@ -55,17 +55,17 @@ Testing with scope as string int(23) int(24) -Fatal error: Uncaught exception 'EngineException' with message 'Cannot access private property B::$x' in %s:%d +Fatal error: Uncaught exception 'Error' with message 'Cannot access private property B::$x' in %s:%d Stack trace: #0 %s(%d): Closure->{closure}() #1 {main} -Next exception 'EngineException' with message 'Cannot access private property B::$x' in %s:%d +Next exception 'Error' with message 'Cannot access private property B::$x' in %s:%d Stack trace: #0 %s(%d): Closure->{closure}() #1 {main} -Next exception 'EngineException' with message 'Cannot access private property B::$x' in %s:%d +Next exception 'Error' with message 'Cannot access private property B::$x' in %s:%d Stack trace: #0 %s(%d): Closure->{closure}() #1 {main} diff --git a/Zend/tests/closure_059.phpt b/Zend/tests/closure_059.phpt index de9c574746ee1..1ee7fe669575b 100644 --- a/Zend/tests/closure_059.phpt +++ b/Zend/tests/closure_059.phpt @@ -19,17 +19,17 @@ call_user_func(array($f,"__invoke"), $a); try { $f($b); -} catch (EngineException $e) { +} catch (Error $e) { echo "Exception: " . $e->getMessage() . "\n"; } try { $f->__invoke($b); -} catch (EngineException $e) { +} catch (Error $e) { echo "Exception: " . $e->getMessage() . "\n"; } try { call_user_func(array($f,"__invoke"), $b); -} catch (EngineException $e) { +} catch (Error $e) { echo "Exception: " . $e->getMessage() . "\n"; } --EXPECTF-- diff --git a/Zend/tests/constant_expressions_exceptions_002.phpt b/Zend/tests/constant_expressions_exceptions_002.phpt index 3259483197cd3..fc15af5e9a534 100644 --- a/Zend/tests/constant_expressions_exceptions_002.phpt +++ b/Zend/tests/constant_expressions_exceptions_002.phpt @@ -4,7 +4,7 @@ Constant Expressions with unsupported operands 002 getMessage() . " in " , $e->getFile() . " on line " . $e->getLine() . "\n"; } ?> diff --git a/Zend/tests/constant_expressions_invalid_offset_type_error.phpt b/Zend/tests/constant_expressions_invalid_offset_type_error.phpt index ded692c2c46c2..d3b38fd0351db 100644 --- a/Zend/tests/constant_expressions_invalid_offset_type_error.phpt +++ b/Zend/tests/constant_expressions_invalid_offset_type_error.phpt @@ -8,7 +8,7 @@ const C2 = [C1, [] => 1]; ?> --EXPECTF-- -Fatal error: Uncaught exception 'EngineException' with message 'Illegal offset type' in %s:%d +Fatal error: Uncaught exception 'Error' with message 'Illegal offset type' in %s:%d Stack trace: #0 {main} thrown in %s on line %d diff --git a/Zend/tests/constant_expressions_self_referencing_array.phpt b/Zend/tests/constant_expressions_self_referencing_array.phpt index 6820f47ded15e..c31b5d47b8afe 100644 --- a/Zend/tests/constant_expressions_self_referencing_array.phpt +++ b/Zend/tests/constant_expressions_self_referencing_array.phpt @@ -9,7 +9,7 @@ class A { var_dump(A::FOO); ?> --EXPECTF-- -Fatal error: Uncaught exception 'EngineException' with message 'Cannot declare self-referencing constant 'self::FOO'' in %s:%d +Fatal error: Uncaught exception 'Error' with message 'Cannot declare self-referencing constant 'self::FOO'' in %s:%d Stack trace: #0 {main} thrown in %s on line %d diff --git a/Zend/tests/dereference_002.phpt b/Zend/tests/dereference_002.phpt index 4d8d9c9942fc1..c7ac94ab7a0f9 100644 --- a/Zend/tests/dereference_002.phpt +++ b/Zend/tests/dereference_002.phpt @@ -76,7 +76,7 @@ NULL Notice: Undefined offset: 3 in %s on line %d -Fatal error: Uncaught exception 'EngineException' with message 'Call to a member function bar() on null' in %s:%d +Fatal error: Uncaught exception 'Error' with message 'Call to a member function bar() on null' in %s:%d Stack trace: #0 {main} thrown in %s on line %d diff --git a/Zend/tests/dereference_010.phpt b/Zend/tests/dereference_010.phpt index 16c76eb77706c..a20288a68757f 100644 --- a/Zend/tests/dereference_010.phpt +++ b/Zend/tests/dereference_010.phpt @@ -24,7 +24,7 @@ var_dump(b()[1]); NULL NULL -Fatal error: Uncaught exception 'EngineException' with message 'Cannot use object of type stdClass as array' in %s:%d +Fatal error: Uncaught exception 'Error' with message 'Cannot use object of type stdClass as array' in %s:%d Stack trace: #0 {main} thrown in %s on line %d diff --git a/Zend/tests/div_002.phpt b/Zend/tests/div_002.phpt index 6a7794fa46242..9f8b6c9a31049 100644 --- a/Zend/tests/div_002.phpt +++ b/Zend/tests/div_002.phpt @@ -8,7 +8,7 @@ $b = array(1); try { var_dump($a / $b); -} catch (EngineException $e) { +} catch (Error $e) { echo "\nException: " . $e->getMessage() . "\n"; } @@ -20,7 +20,7 @@ echo "Done\n"; --EXPECTF-- Exception: Unsupported operand types -Fatal error: Uncaught exception 'EngineException' with message 'Unsupported operand types' in %s:%d +Fatal error: Uncaught exception 'Error' with message 'Unsupported operand types' in %s:%d Stack trace: #0 {main} thrown in %s on line %d diff --git a/Zend/tests/dynamic_call_001.phpt b/Zend/tests/dynamic_call_001.phpt index 5a1025cfa74cd..44df985e64e2e 100644 --- a/Zend/tests/dynamic_call_001.phpt +++ b/Zend/tests/dynamic_call_001.phpt @@ -16,7 +16,7 @@ $a::$a(); --EXPECTF-- Deprecated: Methods with the same name as their class will not be constructors in a future version of PHP; foo has a deprecated constructor in %s on line %d -Fatal error: Uncaught exception 'EngineException' with message 'Non-static method foo::foo() cannot be called statically' in %s:%d +Fatal error: Uncaught exception 'Error' with message 'Non-static method foo::foo() cannot be called statically' in %s:%d Stack trace: #0 {main} thrown in %s on line %d diff --git a/Zend/tests/dynamic_call_002.phpt b/Zend/tests/dynamic_call_002.phpt index c8fad52241d13..a323d34a57cc7 100644 --- a/Zend/tests/dynamic_call_002.phpt +++ b/Zend/tests/dynamic_call_002.phpt @@ -9,7 +9,7 @@ $a::$a(); ?> --EXPECTF-- -Fatal error: Uncaught exception 'EngineException' with message 'Function name must be a string' in %s:%d +Fatal error: Uncaught exception 'Error' with message 'Function name must be a string' in %s:%d Stack trace: #0 {main} thrown in %s on line %d diff --git a/Zend/tests/dynamic_call_003.phpt b/Zend/tests/dynamic_call_003.phpt index 7d5e3e55077fe..17d54da9e9649 100644 --- a/Zend/tests/dynamic_call_003.phpt +++ b/Zend/tests/dynamic_call_003.phpt @@ -10,7 +10,7 @@ $a::$b(); ?> --EXPECTF-- -Fatal error: Uncaught exception 'EngineException' with message 'Function name must be a string' in %s:%d +Fatal error: Uncaught exception 'Error' with message 'Function name must be a string' in %s:%d Stack trace: #0 {main} thrown in %s on line %d diff --git a/Zend/tests/dynamic_call_004.phpt b/Zend/tests/dynamic_call_004.phpt index 056adfc16ba87..9092492311c57 100644 --- a/Zend/tests/dynamic_call_004.phpt +++ b/Zend/tests/dynamic_call_004.phpt @@ -9,7 +9,7 @@ $a::$b(); --EXPECTF-- Notice: Undefined variable: a in %s on line %d -Fatal error: Uncaught exception 'EngineException' with message 'Class name must be a valid object or a string' in %s:%d +Fatal error: Uncaught exception 'Error' with message 'Class name must be a valid object or a string' in %s:%d Stack trace: #0 {main} thrown in %s on line %d diff --git a/Zend/tests/errmsg_044.phpt b/Zend/tests/errmsg_044.phpt index 50234f89c686d..af7ec49facd4d 100644 --- a/Zend/tests/errmsg_044.phpt +++ b/Zend/tests/errmsg_044.phpt @@ -8,7 +8,7 @@ $a[0][0] = new stdclass; ?> --EXPECTF-- -Fatal error: Uncaught exception 'EngineException' with message 'Cannot use object of type stdClass as array' in %s:%d +Fatal error: Uncaught exception 'Error' with message 'Cannot use object of type stdClass as array' in %s:%d Stack trace: #0 {main} thrown in %s on line %d diff --git a/Zend/tests/exception_004.phpt b/Zend/tests/exception_004.phpt index cc9990c386bfc..0bcfc130423f4 100644 --- a/Zend/tests/exception_004.phpt +++ b/Zend/tests/exception_004.phpt @@ -15,7 +15,7 @@ try { ?> --EXPECTF-- -Fatal error: Uncaught exception 'EngineException' with message 'Exceptions must be valid objects derived from the Exception base class' in %s:%d +Fatal error: Uncaught exception 'Error' with message 'Exceptions must be valid objects implementing Throwable' in %s:%d Stack trace: #0 {main} thrown in %s on line %d diff --git a/Zend/tests/exception_005.phpt b/Zend/tests/exception_005.phpt index e52b907ac3be6..032923392e862 100644 --- a/Zend/tests/exception_005.phpt +++ b/Zend/tests/exception_005.phpt @@ -9,7 +9,7 @@ throw new a(); ?> --EXPECTF-- -Fatal error: Uncaught exception 'EngineException' with message 'Cannot instantiate interface a' in %s:%d +Fatal error: Uncaught exception 'Error' with message 'Cannot instantiate interface a' in %s:%d Stack trace: #0 {main} thrown in %s on line %d diff --git a/Zend/tests/exception_006.phpt b/Zend/tests/exception_006.phpt index fb131b5de40f7..ac68c104d6571 100644 --- a/Zend/tests/exception_006.phpt +++ b/Zend/tests/exception_006.phpt @@ -7,7 +7,7 @@ throw 1; ?> --EXPECTF-- -Fatal error: Uncaught exception 'EngineException' with message 'Can only throw objects' in %s:%d +Fatal error: Uncaught exception 'Error' with message 'Can only throw objects' in %s:%d Stack trace: #0 {main} thrown in %s on line %d diff --git a/Zend/tests/exception_010.phpt b/Zend/tests/exception_010.phpt index d67cddab580cf..6bff8c6e5e835 100644 --- a/Zend/tests/exception_010.phpt +++ b/Zend/tests/exception_010.phpt @@ -15,16 +15,16 @@ $x->getcode(1); ?> --EXPECTF-- -Warning: BaseException::getTraceAsString() expects exactly 0 parameters, 1 given in %s on line %d +Warning: Exception::getTraceAsString() expects exactly 0 parameters, 1 given in %s on line %d -Warning: BaseException::__toString() expects exactly 0 parameters, 1 given in %s on line %d +Warning: Exception::__toString() expects exactly 0 parameters, 1 given in %s on line %d -Warning: BaseException::getTrace() expects exactly 0 parameters, 1 given in %s on line %d +Warning: Exception::getTrace() expects exactly 0 parameters, 1 given in %s on line %d -Warning: BaseException::getLine() expects exactly 0 parameters, 1 given in %s on line %d +Warning: Exception::getLine() expects exactly 0 parameters, 1 given in %s on line %d -Warning: BaseException::getFile() expects exactly 0 parameters, 1 given in %s on line %d +Warning: Exception::getFile() expects exactly 0 parameters, 1 given in %s on line %d -Warning: BaseException::getMessage() expects exactly 0 parameters, 1 given in %s on line %d +Warning: Exception::getMessage() expects exactly 0 parameters, 1 given in %s on line %d -Warning: BaseException::getCode() expects exactly 0 parameters, 1 given in %s on line %d +Warning: Exception::getCode() expects exactly 0 parameters, 1 given in %s on line %d diff --git a/Zend/tests/exception_013.phpt b/Zend/tests/exception_013.phpt index 4bbfc32050932..748e354bb380d 100644 --- a/Zend/tests/exception_013.phpt +++ b/Zend/tests/exception_013.phpt @@ -8,19 +8,19 @@ class C { try { var_dump(C::$a); -} catch (EngineException $e) { +} catch (Error $e) { echo "\nException: " . $e->getMessage() . " in " , $e->getFile() . " on line " . $e->getLine() . "\n"; } try { var_dump(C::$p); -} catch (EngineException $e) { +} catch (Error $e) { echo "\nException: " . $e->getMessage() . " in " , $e->getFile() . " on line " . $e->getLine() . "\n"; } try { unset(C::$a); -} catch (EngineException $e) { +} catch (Error $e) { echo "\nException: " . $e->getMessage() . " in " , $e->getFile() . " on line " . $e->getLine() . "\n"; } @@ -33,7 +33,7 @@ Exception: Cannot access private property C::$p in %sexception_013.php on line 1 Exception: Attempt to unset static property C::$a in %sexception_013.php on line 19 -Fatal error: Uncaught exception 'EngineException' with message 'Access to undeclared static property: C::$a' in %sexception_013.php:24 +Fatal error: Uncaught exception 'Error' with message 'Access to undeclared static property: C::$a' in %sexception_013.php:24 Stack trace: #0 {main} thrown in %sexception_013.php on line 24 diff --git a/Zend/tests/exception_014.phpt b/Zend/tests/exception_014.phpt index c1f8615926e1b..cee08e1d58bec 100644 --- a/Zend/tests/exception_014.phpt +++ b/Zend/tests/exception_014.phpt @@ -9,7 +9,7 @@ class C { $x = new C; try { var_dump($x->p); -} catch (EngineException $e) { +} catch (Error $e) { echo "\nException: " . $e->getMessage() . " in " , $e->getFile() . " on line " . $e->getLine() . "\n"; } @@ -18,7 +18,7 @@ var_dump($x->p); --EXPECTF-- Exception: Cannot access private property C::$p in %sexception_014.php on line %d -Fatal error: Uncaught exception 'EngineException' with message 'Cannot access private property C::$p' in %sexception_014.php:%d +Fatal error: Uncaught exception 'Error' with message 'Cannot access private property C::$p' in %sexception_014.php:%d Stack trace: #0 {main} thrown in %sexception_014.php on line %d diff --git a/Zend/tests/exception_015.phpt b/Zend/tests/exception_015.phpt index f4db02aa40e2e..c94bd3a467ffd 100644 --- a/Zend/tests/exception_015.phpt +++ b/Zend/tests/exception_015.phpt @@ -5,7 +5,7 @@ Exceptions on improper access to string $s = "ABC"; try { $s[] = "D"; -} catch (EngineException $e) { +} catch (Error $e) { echo "\nException: " . $e->getMessage() . " in " , $e->getFile() . " on line " . $e->getLine() . "\n"; } @@ -14,7 +14,7 @@ $s[] = "D"; --EXPECTF-- Exception: [] operator not supported for strings in %sexception_015.php on line %d -Fatal error: Uncaught exception 'EngineException' with message '[] operator not supported for strings' in %sexception_015.php:%d +Fatal error: Uncaught exception 'Error' with message '[] operator not supported for strings' in %sexception_015.php:%d Stack trace: #0 {main} thrown in %sexception_015.php on line %d diff --git a/Zend/tests/exception_016.phpt b/Zend/tests/exception_016.phpt index f4ad66855b312..0c0470b8d9013 100644 --- a/Zend/tests/exception_016.phpt +++ b/Zend/tests/exception_016.phpt @@ -4,7 +4,7 @@ Exceptions on improper usage of $this foo(); -} catch (EngineException $e) { +} catch (Error $e) { echo "\nException: " . $e->getMessage() . " in " , $e->getFile() . " on line " . $e->getLine() . "\n"; } @@ -13,7 +13,7 @@ $this->foo(); --EXPECTF-- Exception: Using $this when not in object context in %sexception_016.php on line %d -Fatal error: Uncaught exception 'EngineException' with message 'Using $this when not in object context' in %sexception_016.php:%d +Fatal error: Uncaught exception 'Error' with message 'Using $this when not in object context' in %sexception_016.php:%d Stack trace: #0 {main} thrown in %sexception_016.php on line %d diff --git a/Zend/tests/exception_017.phpt b/Zend/tests/exception_017.phpt index 5a5cca7488b98..b81664ceaeaaa 100644 --- a/Zend/tests/exception_017.phpt +++ b/Zend/tests/exception_017.phpt @@ -11,18 +11,18 @@ function foo(callable $x) { try { C::foo(); -} catch (EngineException $e) { +} catch (Error $e) { echo "\nException: " . $e->getMessage() . " in " , $e->getFile() . " on line " . $e->getLine() . "\n"; } try { foo("C::foo"); -} catch (EngineException $e) { +} catch (Error $e) { echo "\n"; do { echo "Exception: " . $e->getMessage() . "\n"; $e = $e->getPrevious(); - } while ($e instanceof EngineException); + } while ($e instanceof Error); } C::foo(); @@ -33,7 +33,7 @@ Exception: Cannot call abstract method C::foo() in %sexception_017.php on line % Exception: Argument 1 passed to foo() must be callable, string given, called in %sexception_017.php on line %d Exception: Cannot call abstract method C::foo() -Fatal error: Uncaught exception 'EngineException' with message 'Cannot call abstract method C::foo()' in %sexception_017.php:%d +Fatal error: Uncaught exception 'Error' with message 'Cannot call abstract method C::foo()' in %sexception_017.php:%d Stack trace: #0 {main} thrown in %sexception_017.php on line %d diff --git a/Zend/tests/exception_before_fatal.phpt b/Zend/tests/exception_before_fatal.phpt index 1109097e1fdca..7a1399fb7afca 100644 --- a/Zend/tests/exception_before_fatal.phpt +++ b/Zend/tests/exception_before_fatal.phpt @@ -10,38 +10,38 @@ set_error_handler("exception_error_handler"); try { $foo->a(); -} catch(BaseException $e) { +} catch(Throwable $e) { var_dump($e->getMessage()); } try { new $foo(); -} catch(BaseException $e) { +} catch(Throwable $e) { var_dump($e->getMessage()); } try { throw $foo; -} catch(BaseException $e) { +} catch(Throwable $e) { var_dump($e->getMessage()); } try { $foo(); -} catch(BaseException $e) { +} catch(Throwable $e) { var_dump($e->getMessage()); } try { $foo::b(); -} catch(BaseException $e) { +} catch(Throwable $e) { var_dump($e->getMessage()); } try { $b = clone $foo; -} catch(BaseException $e) { +} catch(Throwable $e) { var_dump($e->getMessage()); } @@ -50,7 +50,7 @@ class b { try { b::$foo(); -} catch(BaseException $e) { +} catch(Throwable $e) { var_dump($e->getMessage()); } ?> diff --git a/Zend/tests/generators/bug63066.phpt b/Zend/tests/generators/bug63066.phpt index 439b1f5a6453e..c00e6d481e480 100644 --- a/Zend/tests/generators/bug63066.phpt +++ b/Zend/tests/generators/bug63066.phpt @@ -13,7 +13,7 @@ foreach(gen(new stdClass()) as $value) --EXPECTF-- foo -Fatal error: Uncaught exception 'EngineException' with message 'Call to undefined method stdClass::fatalError()' in %sbug63066.php:5 +Fatal error: Uncaught exception 'Error' with message 'Call to undefined method stdClass::fatalError()' in %sbug63066.php:5 Stack trace: #0 %s(%d): gen(Object(stdClass)) #1 {main} diff --git a/Zend/tests/generators/bug65161.phpt b/Zend/tests/generators/bug65161.phpt index 104462fd22c3f..c11a1730a50d3 100644 --- a/Zend/tests/generators/bug65161.phpt +++ b/Zend/tests/generators/bug65161.phpt @@ -17,7 +17,7 @@ foreach (testGenerator() as $i); ?> --EXPECTF-- -Fatal error: Uncaught exception 'EngineException' with message 'Call to undefined function foo()' in %s:%d +Fatal error: Uncaught exception 'Error' with message 'Call to undefined function foo()' in %s:%d Stack trace: #0 [internal function]: autoload('SyntaxError') #1 %s(%d): spl_autoload_call('SyntaxError') diff --git a/Zend/tests/generators/bug67497.phpt b/Zend/tests/generators/bug67497.phpt index 63e535d33176b..edbd578da58f0 100644 --- a/Zend/tests/generators/bug67497.phpt +++ b/Zend/tests/generators/bug67497.phpt @@ -10,7 +10,7 @@ function gen() { try { eval('abc'); -} catch (ParseException $ex) { +} catch (ParseError $ex) { } $values = gen(); diff --git a/Zend/tests/generators/clone.phpt b/Zend/tests/generators/clone.phpt index cdf0453577139..18c55a0cb55e5 100644 --- a/Zend/tests/generators/clone.phpt +++ b/Zend/tests/generators/clone.phpt @@ -12,7 +12,7 @@ clone $gen; ?> --EXPECTF-- -Fatal error: Uncaught exception 'EngineException' with message 'Trying to clone an uncloneable object of class Generator' in %s:%d +Fatal error: Uncaught exception 'Error' with message 'Trying to clone an uncloneable object of class Generator' in %s:%d Stack trace: #0 {main} thrown in %s on line %d diff --git a/Zend/tests/generators/errors/generator_instantiate_error.phpt b/Zend/tests/generators/errors/generator_instantiate_error.phpt index a67a2f30c8dbf..39d9f402798b0 100644 --- a/Zend/tests/generators/errors/generator_instantiate_error.phpt +++ b/Zend/tests/generators/errors/generator_instantiate_error.phpt @@ -7,7 +7,7 @@ new Generator; ?> --EXPECTF-- -Fatal error: Uncaught exception 'EngineException' with message 'The "Generator" class is reserved for internal use and cannot be manually instantiated' in %s:%d +Fatal error: Uncaught exception 'Error' with message 'The "Generator" class is reserved for internal use and cannot be manually instantiated' in %s:%d Stack trace: #0 {main} thrown in %s on line %d diff --git a/Zend/tests/generators/errors/resume_running_generator_error.phpt b/Zend/tests/generators/errors/resume_running_generator_error.phpt index e31a2c49ae1ab..5a309428c3cc2 100644 --- a/Zend/tests/generators/errors/resume_running_generator_error.phpt +++ b/Zend/tests/generators/errors/resume_running_generator_error.phpt @@ -7,7 +7,7 @@ function gen() { $gen = yield; try { $gen->next(); - } catch (EngineException $e) { + } catch (Error $e) { echo "\nException: " . $e->getMessage() . "\n"; } $gen->next(); @@ -21,7 +21,7 @@ $gen->next(); --EXPECTF-- Exception: Cannot resume an already running generator -Fatal error: Uncaught exception 'EngineException' with message 'Cannot resume an already running generator' in %s:%d +Fatal error: Uncaught exception 'Error' with message 'Cannot resume an already running generator' in %s:%d Stack trace: #0 %s(%d): Generator->next() #1 [internal function]: gen() diff --git a/Zend/tests/generators/errors/yield_in_force_closed_finally_error.phpt b/Zend/tests/generators/errors/yield_in_force_closed_finally_error.phpt index 83523b1baa2fd..d0992d4445d50 100644 --- a/Zend/tests/generators/errors/yield_in_force_closed_finally_error.phpt +++ b/Zend/tests/generators/errors/yield_in_force_closed_finally_error.phpt @@ -26,7 +26,7 @@ unset($gen); before yield before yield in finally -Fatal error: Uncaught exception 'EngineException' with message 'Cannot yield from finally in a force-closed generator' in %s:%d +Fatal error: Uncaught exception 'Error' with message 'Cannot yield from finally in a force-closed generator' in %s:%d Stack trace: #0 %s(%d): gen() #1 {main} diff --git a/Zend/tests/generators/throw_not_an_exception.phpt b/Zend/tests/generators/throw_not_an_exception.phpt index 4ff1464e7c58d..a212b5ae420f1 100644 --- a/Zend/tests/generators/throw_not_an_exception.phpt +++ b/Zend/tests/generators/throw_not_an_exception.phpt @@ -12,7 +12,7 @@ $gen->throw(new stdClass); ?> --EXPECTF-- -Fatal error: Uncaught exception 'EngineException' with message 'Exceptions must be valid objects derived from the Exception base class' in %s:%d +Fatal error: Uncaught exception 'Error' with message 'Exceptions must be valid objects implementing Throwable' in %s:%d Stack trace: #0 [internal function]: gen() #1 %s(%d): Generator->throw(Object(stdClass)) diff --git a/Zend/tests/generators/yield_from_already_running.phpt b/Zend/tests/generators/yield_from_already_running.phpt index 16fda983687e8..38c8e7bb3af74 100644 --- a/Zend/tests/generators/yield_from_already_running.phpt +++ b/Zend/tests/generators/yield_from_already_running.phpt @@ -11,7 +11,7 @@ function gen() { ?> --EXPECTF-- -Fatal error: Uncaught exception 'EngineException' with message 'Impossible to yield from the Generator being currently run' in %s:%d +Fatal error: Uncaught exception 'Error' with message 'Impossible to yield from the Generator being currently run' in %s:%d Stack trace: #0 [internal function]: gen() #1 %s(%d): Generator->send(Object(Generator)) diff --git a/Zend/tests/indirect_call_array_001.phpt b/Zend/tests/indirect_call_array_001.phpt index 73bd1584ef4a1..104cb19dbeb34 100644 --- a/Zend/tests/indirect_call_array_001.phpt +++ b/Zend/tests/indirect_call_array_001.phpt @@ -8,7 +8,7 @@ $arr(); ?> --EXPECTF-- -Fatal error: Uncaught exception 'EngineException' with message 'Class 'a' not found' in %s:%d +Fatal error: Uncaught exception 'Error' with message 'Class 'a' not found' in %s:%d Stack trace: #0 {main} thrown in %s on line %d diff --git a/Zend/tests/indirect_call_array_002.phpt b/Zend/tests/indirect_call_array_002.phpt index 09c3e79e1a0ff..402eb05f5a170 100644 --- a/Zend/tests/indirect_call_array_002.phpt +++ b/Zend/tests/indirect_call_array_002.phpt @@ -8,7 +8,7 @@ $arr(); ?> --EXPECTF-- -Fatal error: Uncaught exception 'EngineException' with message 'Call to undefined method stdClass::b()' in %s:%d +Fatal error: Uncaught exception 'Error' with message 'Call to undefined method stdClass::b()' in %s:%d Stack trace: #0 {main} thrown in %s on line %d diff --git a/Zend/tests/indirect_method_call_002.phpt b/Zend/tests/indirect_method_call_002.phpt index 8b3e9299dd405..671a14d05052a 100644 --- a/Zend/tests/indirect_method_call_002.phpt +++ b/Zend/tests/indirect_method_call_002.phpt @@ -29,7 +29,7 @@ string(7) "testing" string(3) "foo" NULL -Fatal error: Uncaught exception 'EngineException' with message 'Call to undefined method foo::www()' in %s:%d +Fatal error: Uncaught exception 'Error' with message 'Call to undefined method foo::www()' in %s:%d Stack trace: #0 {main} thrown in %s on line %d diff --git a/Zend/tests/list_005.phpt b/Zend/tests/list_005.phpt index d82120e252273..b4fb93b1aeaf8 100644 --- a/Zend/tests/list_005.phpt +++ b/Zend/tests/list_005.phpt @@ -44,7 +44,7 @@ NULL NULL ---- -Fatal error: Uncaught exception 'EngineException' with message 'Cannot use object of type stdClass as array' in %s:%d +Fatal error: Uncaught exception 'Error' with message 'Cannot use object of type stdClass as array' in %s:%d Stack trace: #0 {main} thrown in %s on line %d diff --git a/Zend/tests/list_007.phpt b/Zend/tests/list_007.phpt index 1752b749d8991..b7ce1d289f506 100644 --- a/Zend/tests/list_007.phpt +++ b/Zend/tests/list_007.phpt @@ -9,7 +9,7 @@ var_dump($x, $y); ?> --EXPECTF-- -Fatal error: Uncaught exception 'EngineException' with message 'Cannot use object of type Closure as array' in %slist_007.php:3 +Fatal error: Uncaught exception 'Error' with message 'Cannot use object of type Closure as array' in %slist_007.php:3 Stack trace: #0 {main} thrown in %slist_007.php on line 3 diff --git a/Zend/tests/methods-on-non-objects-catch.phpt b/Zend/tests/methods-on-non-objects-catch.phpt index 5e946161c1b4d..2082433181345 100644 --- a/Zend/tests/methods-on-non-objects-catch.phpt +++ b/Zend/tests/methods-on-non-objects-catch.phpt @@ -9,7 +9,7 @@ set_error_handler(function($code, $message) { $x= null; try { var_dump($x->method()); -} catch (EngineException $e) { +} catch (Error $e) { var_dump($e->getCode(), $e->getMessage()); } echo "Alive\n"; diff --git a/Zend/tests/methods-on-non-objects-usort.phpt b/Zend/tests/methods-on-non-objects-usort.phpt index cb50d2256160e..d52a0fddb5a4a 100644 --- a/Zend/tests/methods-on-non-objects-usort.phpt +++ b/Zend/tests/methods-on-non-objects-usort.phpt @@ -11,7 +11,7 @@ $list= [1, 4, 2, 3, -1]; usort($list, function($a, $b) use ($comparator) { try { return $comparator->compare($a, $b); - } catch (EngineException $e) { + } catch (Error $e) { var_dump($e->getCode(), $e->getMessage()); return 0; } diff --git a/Zend/tests/methods-on-non-objects.phpt b/Zend/tests/methods-on-non-objects.phpt index 803de1cffa205..014027dbf646d 100644 --- a/Zend/tests/methods-on-non-objects.phpt +++ b/Zend/tests/methods-on-non-objects.phpt @@ -9,7 +9,7 @@ echo "Should not get here!\n"; ?> --EXPECTF-- -Fatal error: Uncaught exception 'EngineException' with message 'Call to a member function method() on null' in %s:%d +Fatal error: Uncaught exception 'Error' with message 'Call to a member function method() on null' in %s:%d Stack trace: #0 {main} thrown in %s on line %d diff --git a/Zend/tests/mul_001.phpt b/Zend/tests/mul_001.phpt index 71ec3feb54817..c9f9ddc7ad301 100644 --- a/Zend/tests/mul_001.phpt +++ b/Zend/tests/mul_001.phpt @@ -8,7 +8,7 @@ $b = array(1); try { var_dump($a * $b); -} catch (EngineException $e) { +} catch (Error $e) { echo "\nException: " . $e->getMessage() . "\n"; } @@ -20,7 +20,7 @@ echo "Done\n"; --EXPECTF-- Exception: Unsupported operand types -Fatal error: Uncaught exception 'EngineException' with message 'Unsupported operand types' in %s:%d +Fatal error: Uncaught exception 'Error' with message 'Unsupported operand types' in %s:%d Stack trace: #0 {main} thrown in %s on line %d diff --git a/Zend/tests/not_002.phpt b/Zend/tests/not_002.phpt index 78899a4652948..fb4fe379bcf0d 100644 --- a/Zend/tests/not_002.phpt +++ b/Zend/tests/not_002.phpt @@ -8,7 +8,7 @@ $b = array(1,2); try { var_dump(~$b); -} catch (EngineException $e) { +} catch (Error $e) { echo "\nException: " . $e->getMessage() . "\n"; } @@ -20,7 +20,7 @@ echo "Done\n"; --EXPECTF-- Exception: Unsupported operand types -Fatal error: Uncaught exception 'EngineException' with message 'Unsupported operand types' in %s:%d +Fatal error: Uncaught exception 'Error' with message 'Unsupported operand types' in %s:%d Stack trace: #0 {main} thrown in %s on line %d diff --git a/Zend/tests/ns_004.phpt b/Zend/tests/ns_004.phpt index e7b63ea1ac20b..b37938b4a6d29 100644 --- a/Zend/tests/ns_004.phpt +++ b/Zend/tests/ns_004.phpt @@ -6,7 +6,7 @@ namespace test\ns1; echo get_class(new Exception()),"\n"; --EXPECTF-- -Fatal error: Uncaught exception 'EngineException' with message 'Class 'test\ns1\Exception' not found' in %sns_004.php:%d +Fatal error: Uncaught exception 'Error' with message 'Class 'test\ns1\Exception' not found' in %sns_004.php:%d Stack trace: #0 {main} thrown in %sns_004.php on line %d \ No newline at end of file diff --git a/Zend/tests/ns_026.phpt b/Zend/tests/ns_026.phpt index bb596901e3d52..49ab2d82f532c 100644 --- a/Zend/tests/ns_026.phpt +++ b/Zend/tests/ns_026.phpt @@ -32,7 +32,7 @@ Method - Foo\Foo::__construct Method - Foo\Foo::Bar Func - Foo\Bar -Fatal error: Uncaught exception 'EngineException' with message 'Call to undefined function Foo\Foo\Bar()' in %sns_026.php:%d +Fatal error: Uncaught exception 'Error' with message 'Call to undefined function Foo\Foo\Bar()' in %sns_026.php:%d Stack trace: #0 {main} thrown in %sns_026.php on line %d \ No newline at end of file diff --git a/Zend/tests/ns_038.phpt b/Zend/tests/ns_038.phpt index 5664eafdcb0fa..172e9bf1d407e 100644 --- a/Zend/tests/ns_038.phpt +++ b/Zend/tests/ns_038.phpt @@ -11,7 +11,7 @@ function foo() { --EXPECTF-- ok -Fatal error: Uncaught exception 'EngineException' with message 'Call to undefined method Exception::bar()' in %sns_038.php:7 +Fatal error: Uncaught exception 'Error' with message 'Call to undefined method Exception::bar()' in %sns_038.php:7 Stack trace: #0 {main} thrown in %sns_038.php on line 7 diff --git a/Zend/tests/ns_057.phpt b/Zend/tests/ns_057.phpt index aae2e7c12ba91..34892e2286ea0 100644 --- a/Zend/tests/ns_057.phpt +++ b/Zend/tests/ns_057.phpt @@ -56,7 +56,7 @@ const ok class ok ok -Fatal error: Uncaught exception 'EngineException' with message 'Undefined constant 'Test\ns1\unknown'' in %sns_057.php:%d +Fatal error: Uncaught exception 'Error' with message 'Undefined constant 'Test\ns1\unknown'' in %sns_057.php:%d Stack trace: #0 {main} thrown in %sns_057.php on line %d \ No newline at end of file diff --git a/Zend/tests/ns_058.phpt b/Zend/tests/ns_058.phpt index b46c968ff4d68..d0096fb385f61 100644 --- a/Zend/tests/ns_058.phpt +++ b/Zend/tests/ns_058.phpt @@ -54,7 +54,7 @@ const ok class ok ok -Fatal error: Uncaught exception 'EngineException' with message 'Undefined constant 'unknown'' in %sns_058.php:%d +Fatal error: Uncaught exception 'Error' with message 'Undefined constant 'unknown'' in %sns_058.php:%d Stack trace: #0 {main} thrown in %sns_058.php on line %d diff --git a/Zend/tests/ns_076.phpt b/Zend/tests/ns_076.phpt index ac4e519b8aaf2..3f7ef4388bac6 100644 --- a/Zend/tests/ns_076.phpt +++ b/Zend/tests/ns_076.phpt @@ -22,7 +22,7 @@ array(1) { %s(7) "unknown" } -Fatal error: Uncaught exception 'EngineException' with message 'Undefined constant 'unknown'' in %sns_076.php:%d +Fatal error: Uncaught exception 'Error' with message 'Undefined constant 'unknown'' in %sns_076.php:%d Stack trace: #0 {main} thrown in %sns_076.php on line %d diff --git a/Zend/tests/ns_077_1.phpt b/Zend/tests/ns_077_1.phpt index ffe4a7d3a5031..f003a04223ca3 100644 --- a/Zend/tests/ns_077_1.phpt +++ b/Zend/tests/ns_077_1.phpt @@ -10,7 +10,7 @@ function foo($a = array(0 => \unknown)) foo(); --EXPECTF-- -Fatal error: Uncaught exception 'EngineException' with message 'Undefined constant 'unknown'' in %sns_077_%d.php:%d +Fatal error: Uncaught exception 'Error' with message 'Undefined constant 'unknown'' in %sns_077_%d.php:%d Stack trace: #0 %s(%d): foo\foo() #1 {main} diff --git a/Zend/tests/ns_077_2.phpt b/Zend/tests/ns_077_2.phpt index c8c1b96399307..3f9ffacbe7c5b 100644 --- a/Zend/tests/ns_077_2.phpt +++ b/Zend/tests/ns_077_2.phpt @@ -10,7 +10,7 @@ function foo($a = array(\unknown => unknown)) foo(); --EXPECTF-- -Fatal error: Uncaught exception 'EngineException' with message 'Undefined constant 'unknown'' in %sns_077_%d.php:%d +Fatal error: Uncaught exception 'Error' with message 'Undefined constant 'unknown'' in %sns_077_%d.php:%d Stack trace: #0 %s(%d): foo\foo() #1 {main} diff --git a/Zend/tests/ns_077_3.phpt b/Zend/tests/ns_077_3.phpt index ff53e793c28ff..0d42fb5b85dea 100644 --- a/Zend/tests/ns_077_3.phpt +++ b/Zend/tests/ns_077_3.phpt @@ -10,7 +10,7 @@ function foo($a = array(namespace\unknown => unknown)) foo(); --EXPECTF-- -Fatal error: Uncaught exception 'EngineException' with message 'Undefined constant 'foo\unknown'' in %sns_077_%d.php:%d +Fatal error: Uncaught exception 'Error' with message 'Undefined constant 'foo\unknown'' in %sns_077_%d.php:%d Stack trace: #0 %s(%d): foo\foo() #1 {main} diff --git a/Zend/tests/ns_077_4.phpt b/Zend/tests/ns_077_4.phpt index 4b7f06dc9ae9f..34eca93b9c983 100644 --- a/Zend/tests/ns_077_4.phpt +++ b/Zend/tests/ns_077_4.phpt @@ -10,7 +10,7 @@ function foo($a = array(0 => namespace\unknown)) foo(); --EXPECTF-- -Fatal error: Uncaught exception 'EngineException' with message 'Undefined constant 'foo\unknown'' in %sns_077_%d.php:%d +Fatal error: Uncaught exception 'Error' with message 'Undefined constant 'foo\unknown'' in %sns_077_%d.php:%d Stack trace: #0 %s(%d): foo\foo() #1 {main} diff --git a/Zend/tests/ns_077_5.phpt b/Zend/tests/ns_077_5.phpt index ade0983e1ff98..1afcdc3b3d727 100644 --- a/Zend/tests/ns_077_5.phpt +++ b/Zend/tests/ns_077_5.phpt @@ -9,7 +9,7 @@ function foo($a = array(0 => \unknown)) foo(); --EXPECTF-- -Fatal error: Uncaught exception 'EngineException' with message 'Undefined constant 'unknown'' in %sns_077_%d.php:%d +Fatal error: Uncaught exception 'Error' with message 'Undefined constant 'unknown'' in %sns_077_%d.php:%d Stack trace: #0 %s(%d): foo() #1 {main} diff --git a/Zend/tests/ns_077_6.phpt b/Zend/tests/ns_077_6.phpt index ade0983e1ff98..1afcdc3b3d727 100644 --- a/Zend/tests/ns_077_6.phpt +++ b/Zend/tests/ns_077_6.phpt @@ -9,7 +9,7 @@ function foo($a = array(0 => \unknown)) foo(); --EXPECTF-- -Fatal error: Uncaught exception 'EngineException' with message 'Undefined constant 'unknown'' in %sns_077_%d.php:%d +Fatal error: Uncaught exception 'Error' with message 'Undefined constant 'unknown'' in %sns_077_%d.php:%d Stack trace: #0 %s(%d): foo() #1 {main} diff --git a/Zend/tests/ns_077_7.phpt b/Zend/tests/ns_077_7.phpt index 650eb07b63479..99a6699b9bdb8 100644 --- a/Zend/tests/ns_077_7.phpt +++ b/Zend/tests/ns_077_7.phpt @@ -9,7 +9,7 @@ function foo($a = array(0 => namespace\unknown)) foo(); --EXPECTF-- -Fatal error: Uncaught exception 'EngineException' with message 'Undefined constant 'unknown'' in %sns_077_%d.php:%d +Fatal error: Uncaught exception 'Error' with message 'Undefined constant 'unknown'' in %sns_077_%d.php:%d Stack trace: #0 %s(%d): foo() #1 {main} diff --git a/Zend/tests/ns_077_8.phpt b/Zend/tests/ns_077_8.phpt index 34e955416404c..2d7c9ac0bc6aa 100644 --- a/Zend/tests/ns_077_8.phpt +++ b/Zend/tests/ns_077_8.phpt @@ -9,7 +9,7 @@ function foo($a = array(namespace\unknown => unknown)) foo(); --EXPECTF-- -Fatal error: Uncaught exception 'EngineException' with message 'Undefined constant 'unknown'' in %sns_077_%d.php:%d +Fatal error: Uncaught exception 'Error' with message 'Undefined constant 'unknown'' in %sns_077_%d.php:%d Stack trace: #0 %s(%d): foo() #1 {main} diff --git a/Zend/tests/ns_092.phpt b/Zend/tests/ns_092.phpt index ef0f5dacf951c..41cf269f8eafd 100644 --- a/Zend/tests/ns_092.phpt +++ b/Zend/tests/ns_092.phpt @@ -64,7 +64,7 @@ Foo\Bar\fiz Foo\Bar\biz Foo\Bar\buz -Fatal error: Uncaught exception 'EngineException' with message 'Call to undefined function Foo\Bar\A()' in %sns_092.php:45 +Fatal error: Uncaught exception 'Error' with message 'Call to undefined function Foo\Bar\A()' in %sns_092.php:45 Stack trace: #0 {main} thrown in %sns_092.php on line 45 diff --git a/Zend/tests/objects_017.phpt b/Zend/tests/objects_017.phpt index c07de71b73e7a..5881d2dcb76a7 100644 --- a/Zend/tests/objects_017.phpt +++ b/Zend/tests/objects_017.phpt @@ -15,7 +15,7 @@ test()->test = 2; ?> --EXPECTF-- -Fatal error: Uncaught exception 'EngineException' with message 'Cannot access private property foo::$test' in %s:%d +Fatal error: Uncaught exception 'Error' with message 'Cannot access private property foo::$test' in %s:%d Stack trace: #0 {main} thrown in %s on line %d diff --git a/Zend/tests/objects_025.phpt b/Zend/tests/objects_025.phpt index e2711bd4179d9..3afabed9d6988 100644 --- a/Zend/tests/objects_025.phpt +++ b/Zend/tests/objects_025.phpt @@ -43,7 +43,7 @@ static - ok non-static - ok static - ok -Fatal error: Uncaught exception 'EngineException' with message 'Method name must be a string' in %s:%d +Fatal error: Uncaught exception 'Error' with message 'Method name must be a string' in %s:%d Stack trace: #0 {main} thrown in %s on line %d diff --git a/Zend/tests/objects_026.phpt b/Zend/tests/objects_026.phpt index e3bc411a468ce..560247fa36c33 100644 --- a/Zend/tests/objects_026.phpt +++ b/Zend/tests/objects_026.phpt @@ -10,7 +10,7 @@ try { ?> --EXPECTF-- -Fatal error: Uncaught exception 'EngineException' with message 'Using $this when not in object context' in %s:%d +Fatal error: Uncaught exception 'Error' with message 'Using $this when not in object context' in %s:%d Stack trace: #0 {main} thrown in %s on line %d diff --git a/Zend/tests/objects_029.phpt b/Zend/tests/objects_029.phpt index 883785d75c607..cc8ca903c5b35 100644 --- a/Zend/tests/objects_029.phpt +++ b/Zend/tests/objects_029.phpt @@ -23,7 +23,7 @@ new foo; ?> --EXPECTF-- -Fatal error: Uncaught exception 'EngineException' with message 'Access to undeclared static property: foo::$f' in %s:%d +Fatal error: Uncaught exception 'Error' with message 'Access to undeclared static property: foo::$f' in %s:%d Stack trace: #0 %s(%d): foo->__construct() #1 {main} diff --git a/Zend/tests/objects_030.phpt b/Zend/tests/objects_030.phpt index 21e42cb247506..5805de5a86701 100644 --- a/Zend/tests/objects_030.phpt +++ b/Zend/tests/objects_030.phpt @@ -23,7 +23,7 @@ new foo; ?> --EXPECTF-- -Fatal error: Uncaught exception 'EngineException' with message 'Access to undeclared static property: bar::$f' in %s:%d +Fatal error: Uncaught exception 'Error' with message 'Access to undeclared static property: bar::$f' in %s:%d Stack trace: #0 %s(%d): foo->__construct() #1 {main} diff --git a/Zend/tests/offset_assign.phpt b/Zend/tests/offset_assign.phpt index ab547c8cd172f..0f82b73c766c2 100644 --- a/Zend/tests/offset_assign.phpt +++ b/Zend/tests/offset_assign.phpt @@ -10,7 +10,7 @@ echo "Done\n"; --EXPECTF-- Warning: Illegal string offset 'x' in %soffset_assign.php on line %d -Fatal error: Uncaught exception 'EngineException' with message 'Cannot use string offset as an array' in %soffset_assign.php:%d +Fatal error: Uncaught exception 'Error' with message 'Cannot use string offset as an array' in %soffset_assign.php:%d Stack trace: #0 {main} thrown in %soffset_assign.php on line %d diff --git a/Zend/tests/offset_object.phpt b/Zend/tests/offset_object.phpt index 4b9d9329a2d81..54d626a1e640a 100644 --- a/Zend/tests/offset_object.phpt +++ b/Zend/tests/offset_object.phpt @@ -8,7 +8,7 @@ var_dump($object[1]); ?> --EXPECTF-- -Fatal error: Uncaught exception 'EngineException' with message 'Cannot use object of type stdClass as array' in %s:%d +Fatal error: Uncaught exception 'Error' with message 'Cannot use object of type stdClass as array' in %s:%d Stack trace: #0 {main} thrown in %s on line %d diff --git a/Zend/tests/parent_class_name_without_parent.phpt b/Zend/tests/parent_class_name_without_parent.phpt index 8cef8619e3958..f4d6307299023 100644 --- a/Zend/tests/parent_class_name_without_parent.phpt +++ b/Zend/tests/parent_class_name_without_parent.phpt @@ -17,7 +17,7 @@ class C { ?> --EXPECTF-- -Fatal error: Uncaught exception 'EngineException' with message 'Cannot use "parent" when current class scope has no parent' in %s:5 +Fatal error: Uncaught exception 'Error' with message 'Cannot use "parent" when current class scope has no parent' in %s:5 Stack trace: #0 %s(%d): C->f() #1 {main} diff --git a/Zend/tests/require_parse_exception.phpt b/Zend/tests/require_parse_exception.phpt index c1de21a4de694..db6844c2ea978 100644 --- a/Zend/tests/require_parse_exception.phpt +++ b/Zend/tests/require_parse_exception.phpt @@ -8,7 +8,7 @@ allow_url_include=1 function test_parse_error($code) { try { require 'data://text/plain;base64,' . base64_encode($code); - } catch (ParseException $e) { + } catch (ParseError $e) { echo $e->getMessage(), " on line ", $e->getLine(), "\n"; } } diff --git a/Zend/tests/str_offset_002.phpt b/Zend/tests/str_offset_002.phpt index 596a7c6eba80c..481aaf748a0fe 100644 --- a/Zend/tests/str_offset_002.phpt +++ b/Zend/tests/str_offset_002.phpt @@ -6,7 +6,7 @@ $a = "aaa"; $x = array(&$a[1]); ?> --EXPECTF-- -Fatal error: Uncaught exception 'EngineException' with message 'Cannot create references to/from string offsets' in %sstr_offset_002.php:3 -Stack trace: -#0 {main} +Fatal error: Uncaught exception 'Error' with message 'Cannot create references to/from string offsets' in %sstr_offset_002.php:3 +Stack trace: +#0 {main} thrown in %sstr_offset_002.php on line 3 diff --git a/Zend/tests/sub_001.phpt b/Zend/tests/sub_001.phpt index bbfdaa7fa5532..030e30630921b 100644 --- a/Zend/tests/sub_001.phpt +++ b/Zend/tests/sub_001.phpt @@ -8,7 +8,7 @@ $b = array(1); try { var_dump($a - $b); -} catch (EngineException $e) { +} catch (Error $e) { echo "\nException: " . $e->getMessage() . "\n"; } @@ -20,7 +20,7 @@ echo "Done\n"; --EXPECTF-- Exception: Unsupported operand types -Fatal error: Uncaught exception 'EngineException' with message 'Unsupported operand types' in %s:%d +Fatal error: Uncaught exception 'Error' with message 'Unsupported operand types' in %s:%d Stack trace: #0 {main} thrown in %s on line %d diff --git a/Zend/tests/traits/bug60173.phpt b/Zend/tests/traits/bug60173.phpt index ddc667693bb3f..7daa1029346b2 100644 --- a/Zend/tests/traits/bug60173.phpt +++ b/Zend/tests/traits/bug60173.phpt @@ -9,7 +9,7 @@ $rc = new ReflectionClass('foo'); $rc->newInstance(); --EXPECTF-- -Fatal error: Uncaught exception 'EngineException' with message 'Cannot instantiate trait foo' in %s:%d +Fatal error: Uncaught exception 'Error' with message 'Cannot instantiate trait foo' in %s:%d Stack trace: #0 %s(%d): ReflectionClass->newInstance() #1 {main} diff --git a/Zend/tests/traits/bugs/alias01.phpt b/Zend/tests/traits/bugs/alias01.phpt index 094948c27342e..12b4ca79c6e86 100644 --- a/Zend/tests/traits/bugs/alias01.phpt +++ b/Zend/tests/traits/bugs/alias01.phpt @@ -23,7 +23,7 @@ T:m1 T:m1 T:m2 -Fatal error: Uncaught exception 'EngineException' with message 'Call to undefined method C1::a2()' in %s:%d +Fatal error: Uncaught exception 'Error' with message 'Call to undefined method C1::a2()' in %s:%d Stack trace: #0 {main} thrown in %s on line %d diff --git a/Zend/tests/traits/error_007.phpt b/Zend/tests/traits/error_007.phpt index 92ff6641741fb..e231547269714 100644 --- a/Zend/tests/traits/error_007.phpt +++ b/Zend/tests/traits/error_007.phpt @@ -10,7 +10,7 @@ new abc; ?> --EXPECTF-- -Fatal error: Uncaught exception 'EngineException' with message 'Cannot instantiate trait abc' in %s:%d +Fatal error: Uncaught exception 'Error' with message 'Cannot instantiate trait abc' in %s:%d Stack trace: #0 {main} thrown in %s on line %d diff --git a/Zend/tests/traits/error_012.phpt b/Zend/tests/traits/error_012.phpt index 8e631fd5cce6e..c6e5e041349e7 100644 --- a/Zend/tests/traits/error_012.phpt +++ b/Zend/tests/traits/error_012.phpt @@ -16,7 +16,7 @@ var_dump($x->test()); ?> --EXPECTF-- -Fatal error: Uncaught exception 'EngineException' with message 'Call to protected method bar::test() from context ''' in %s:%d +Fatal error: Uncaught exception 'Error' with message 'Call to protected method bar::test() from context ''' in %s:%d Stack trace: #0 {main} thrown in %s on line %d diff --git a/Zend/tests/traits/language008a.phpt b/Zend/tests/traits/language008a.phpt index 45164d550c520..1dad14b250c19 100644 --- a/Zend/tests/traits/language008a.phpt +++ b/Zend/tests/traits/language008a.phpt @@ -20,7 +20,7 @@ $o->sayHello(); ?> --EXPECTF-- -Fatal error: Uncaught exception 'EngineException' with message 'Call to protected method MyClass::sayHello() from context ''' in %s:%d +Fatal error: Uncaught exception 'Error' with message 'Call to protected method MyClass::sayHello() from context ''' in %s:%d Stack trace: #0 {main} thrown in %s on line %d \ No newline at end of file diff --git a/Zend/tests/traits/language008b.phpt b/Zend/tests/traits/language008b.phpt index 14e4ba8198022..4bcb33f389ce4 100644 --- a/Zend/tests/traits/language008b.phpt +++ b/Zend/tests/traits/language008b.phpt @@ -27,7 +27,7 @@ $o->sayHelloWorld(); ?> --EXPECTF-- Hello World!Hello World! -Fatal error: Uncaught exception 'EngineException' with message 'Call to private method MyClass::sayHelloWorld() from context ''' in %s:%d +Fatal error: Uncaught exception 'Error' with message 'Call to private method MyClass::sayHelloWorld() from context ''' in %s:%d Stack trace: #0 {main} thrown in %s on line %d \ No newline at end of file diff --git a/Zend/tests/typehints/internal_function_strict_mode.phpt b/Zend/tests/typehints/internal_function_strict_mode.phpt index 3e5629af95173..f501c2b75f73b 100644 --- a/Zend/tests/typehints/internal_function_strict_mode.phpt +++ b/Zend/tests/typehints/internal_function_strict_mode.phpt @@ -7,21 +7,21 @@ declare(strict_types=1); echo "*** Trying Ord With Integer" . PHP_EOL; try { var_dump(ord(1)); -} catch (TypeException $e) { +} catch (TypeError $e) { echo "*** Caught " . $e->getMessage() . PHP_EOL; } echo "*** Trying Array Map With Invalid Callback" . PHP_EOL; try { array_map([null, "bar"], []); -} catch (TypeException $e) { +} catch (TypeError $e) { echo "*** Caught " . $e->getMessage() . PHP_EOL; } echo "*** Trying Strlen With Float" . PHP_EOL; try { var_dump(strlen(1.5)); -} catch (TypeException $e) { +} catch (TypeError $e) { echo "*** Caught " . $e->getMessage() . PHP_EOL; } diff --git a/Zend/tests/typehints/scalar_basic.phpt b/Zend/tests/typehints/scalar_basic.phpt index 08a0121bbe15c..f27dc2b8859ef 100644 --- a/Zend/tests/typehints/scalar_basic.phpt +++ b/Zend/tests/typehints/scalar_basic.phpt @@ -51,7 +51,7 @@ foreach ($functions as $type => $function) { var_dump($value); try { var_dump($function($value)); - } catch (\TypeException $e) { + } catch (\TypeError $e) { echo "*** Caught " . $e->getMessage() . PHP_EOL; } } diff --git a/Zend/tests/typehints/scalar_none.phpt b/Zend/tests/typehints/scalar_none.phpt index af6d8c8dfaa22..5a983770228b2 100644 --- a/Zend/tests/typehints/scalar_none.phpt +++ b/Zend/tests/typehints/scalar_none.phpt @@ -28,7 +28,7 @@ foreach ($functions as $type => $function) { echo "Testing $type:", PHP_EOL; try { var_dump($function()); - } catch (TypeException $e) { + } catch (TypeError $e) { echo "*** Caught " . $e->getMessage() . PHP_EOL; } } diff --git a/Zend/tests/typehints/scalar_null.phpt b/Zend/tests/typehints/scalar_null.phpt index e149388ef09e7..f409e34867428 100644 --- a/Zend/tests/typehints/scalar_null.phpt +++ b/Zend/tests/typehints/scalar_null.phpt @@ -28,7 +28,7 @@ foreach ($functions as $type => $function) { echo "Testing $type:", PHP_EOL; try { var_dump($function(null)); - } catch (TypeException $e) { + } catch (TypeError $e) { echo "*** Caught " . $e->getMessage() . PHP_EOL; } } diff --git a/Zend/tests/typehints/scalar_return_basic.phpt b/Zend/tests/typehints/scalar_return_basic.phpt index 76b01a8c898aa..b01a9304859a1 100644 --- a/Zend/tests/typehints/scalar_return_basic.phpt +++ b/Zend/tests/typehints/scalar_return_basic.phpt @@ -54,7 +54,7 @@ foreach ($functions as $type => $function) { var_dump($value); try { var_dump($function($value)); - } catch (TypeException $e) { + } catch (TypeError $e) { echo "*** Caught " . $e->getMessage() . PHP_EOL; } } diff --git a/Zend/tests/typehints/scalar_return_basic_64bit.phpt b/Zend/tests/typehints/scalar_return_basic_64bit.phpt index edb5231dc04d6..6994817404cac 100644 --- a/Zend/tests/typehints/scalar_return_basic_64bit.phpt +++ b/Zend/tests/typehints/scalar_return_basic_64bit.phpt @@ -54,7 +54,7 @@ foreach ($functions as $type => $function) { var_dump($value); try { var_dump($function($value)); - } catch (TypeException $e) { + } catch (TypeError $e) { echo "*** Caught " . $e->getMessage() . PHP_EOL; } } diff --git a/Zend/tests/typehints/scalar_strict.phpt b/Zend/tests/typehints/scalar_strict.phpt index e0f89f95b1cf8..59ec45ac4f8bd 100644 --- a/Zend/tests/typehints/scalar_strict.phpt +++ b/Zend/tests/typehints/scalar_strict.phpt @@ -55,7 +55,7 @@ foreach ($functions as $type => $function) { var_dump($value); try { var_dump($function($value)); - } catch (TypeException $e) { + } catch (TypeError $e) { echo "*** Caught " . $e->getMessage() . PHP_EOL; } } diff --git a/Zend/tests/typehints/scalar_strict_64bit.phpt b/Zend/tests/typehints/scalar_strict_64bit.phpt index da3e1e454633f..4671b07609aeb 100644 --- a/Zend/tests/typehints/scalar_strict_64bit.phpt +++ b/Zend/tests/typehints/scalar_strict_64bit.phpt @@ -55,7 +55,7 @@ foreach ($functions as $type => $function) { var_dump($value); try { var_dump($function($value)); - } catch (TypeException $e) { + } catch (TypeError $e) { echo "*** Caught " . $e->getMessage() . PHP_EOL; } } diff --git a/Zend/tests/typehints/scalar_strict_basic.phpt b/Zend/tests/typehints/scalar_strict_basic.phpt index d56af159d74d2..15030e1c86287 100644 --- a/Zend/tests/typehints/scalar_strict_basic.phpt +++ b/Zend/tests/typehints/scalar_strict_basic.phpt @@ -54,7 +54,7 @@ foreach ($functions as $type => $function) { echo PHP_EOL . "*** Trying ", type($value), " value", PHP_EOL; try { var_dump($function($value)); - } catch (TypeException $e) { + } catch (TypeError $e) { echo "*** Caught " . $e->getMessage() . PHP_EOL; } } diff --git a/Zend/tests/use_const/no_global_fallback.phpt b/Zend/tests/use_const/no_global_fallback.phpt index 40978c17fb90b..c83bea944a300 100644 --- a/Zend/tests/use_const/no_global_fallback.phpt +++ b/Zend/tests/use_const/no_global_fallback.phpt @@ -10,7 +10,7 @@ var_dump(baz); ?> --EXPECTF-- -Fatal error: Uncaught exception 'EngineException' with message 'Undefined constant 'foo\bar\baz'' in %s:%d +Fatal error: Uncaught exception 'Error' with message 'Undefined constant 'foo\bar\baz'' in %s:%d Stack trace: #0 {main} thrown in %s on line %d diff --git a/Zend/tests/use_function/no_global_fallback.phpt b/Zend/tests/use_function/no_global_fallback.phpt index 45fc32c4da1c5..6756b0ceeb2e5 100644 --- a/Zend/tests/use_function/no_global_fallback.phpt +++ b/Zend/tests/use_function/no_global_fallback.phpt @@ -10,7 +10,7 @@ var_dump(baz()); ?> --EXPECTF-- -Fatal error: Uncaught exception 'EngineException' with message 'Call to undefined function foo\bar\baz()' in %s:%d +Fatal error: Uncaught exception 'Error' with message 'Call to undefined function foo\bar\baz()' in %s:%d Stack trace: #0 {main} thrown in %s on line %d diff --git a/Zend/tests/use_function/no_global_fallback2.phpt b/Zend/tests/use_function/no_global_fallback2.phpt index 24551e0089216..c53c984c1a9e1 100644 --- a/Zend/tests/use_function/no_global_fallback2.phpt +++ b/Zend/tests/use_function/no_global_fallback2.phpt @@ -15,7 +15,7 @@ namespace foo { ?> --EXPECTF-- -Fatal error: Uncaught exception 'EngineException' with message 'Call to undefined function bar\test()' in %s:%d +Fatal error: Uncaught exception 'Error' with message 'Call to undefined function bar\test()' in %s:%d Stack trace: #0 {main} thrown in %s on line %d diff --git a/Zend/tests/varSyntax/method_call_on_string_literal.phpt b/Zend/tests/varSyntax/method_call_on_string_literal.phpt index 93b51a2570f72..e423a15063886 100644 --- a/Zend/tests/varSyntax/method_call_on_string_literal.phpt +++ b/Zend/tests/varSyntax/method_call_on_string_literal.phpt @@ -5,7 +5,7 @@ Method call on string literal "string"->length(); ?> --EXPECTF-- -Fatal error: Uncaught exception 'EngineException' with message 'Call to a member function length() on string' in %s:%d +Fatal error: Uncaught exception 'Error' with message 'Call to a member function length() on string' in %s:%d Stack trace: #0 {main} thrown in %s on line %d diff --git a/Zend/tests/varSyntax/tempDimFetchByRefError.phpt b/Zend/tests/varSyntax/tempDimFetchByRefError.phpt index 9421d8edc5a99..3ec22ef55c3f7 100644 --- a/Zend/tests/varSyntax/tempDimFetchByRefError.phpt +++ b/Zend/tests/varSyntax/tempDimFetchByRefError.phpt @@ -8,7 +8,7 @@ $fn([0, 1][0]); ?> --EXPECTF-- -Fatal error: Uncaught exception 'EngineException' with message 'Cannot use temporary expression in write context' in %s:%d +Fatal error: Uncaught exception 'Error' with message 'Cannot use temporary expression in write context' in %s:%d Stack trace: #0 {main} thrown in %s on line %d diff --git a/Zend/tests/varSyntax/tempPropFetchByRefError.phpt b/Zend/tests/varSyntax/tempPropFetchByRefError.phpt index 8bcb9198e7ea1..0222f0d1b97da 100644 --- a/Zend/tests/varSyntax/tempPropFetchByRefError.phpt +++ b/Zend/tests/varSyntax/tempPropFetchByRefError.phpt @@ -8,7 +8,7 @@ $fn([0, 1]->prop); ?> --EXPECTF-- -Fatal error: Uncaught exception 'EngineException' with message 'Cannot use temporary expression in write context' in %s:%d +Fatal error: Uncaught exception 'Error' with message 'Cannot use temporary expression in write context' in %s:%d Stack trace: #0 {main} thrown in %s on line %d diff --git a/Zend/tests/variadic/typehint_suppressed_error.phpt b/Zend/tests/variadic/typehint_suppressed_error.phpt index 5879de6d954d1..24109e08917b5 100644 --- a/Zend/tests/variadic/typehint_suppressed_error.phpt +++ b/Zend/tests/variadic/typehint_suppressed_error.phpt @@ -9,7 +9,7 @@ function test(array... $args) { try { test([0], [1], 2); -} catch(EngineException $e) { +} catch(Error $e) { var_dump($e->getMessage()); } diff --git a/ext/date/tests/DateTimeZone_construct_error.phpt b/ext/date/tests/DateTimeZone_construct_error.phpt index 6ff900d82fefa..8c8b14f12cb42 100644 --- a/ext/date/tests/DateTimeZone_construct_error.phpt +++ b/ext/date/tests/DateTimeZone_construct_error.phpt @@ -17,7 +17,7 @@ $timezone = "GMT"; $extra_arg = 99; try { new DateTimeZone($timezone, $extra_arg); -} catch (TypeException $e) { +} catch (TypeError $e) { echo $e->getMessage(), "\n"; } diff --git a/ext/date/tests/DateTimeZone_construct_variation1.phpt b/ext/date/tests/DateTimeZone_construct_variation1.phpt index 96f5372611a84..d9625eedc0c57 100644 --- a/ext/date/tests/DateTimeZone_construct_variation1.phpt +++ b/ext/date/tests/DateTimeZone_construct_variation1.phpt @@ -97,7 +97,7 @@ foreach($inputs as $variation =>$timezone) { echo "\n-- $variation --\n"; try { var_dump( new DateTimezone($timezone) ); - } catch (BaseException $e) { + } catch (Throwable $e) { $msg = $e->getMessage(); echo "FAILED: " . $msg . "\n"; } diff --git a/ext/date/tests/DateTime_construct_error.phpt b/ext/date/tests/DateTime_construct_error.phpt index de42566961e6a..d0a453fd9df71 100644 --- a/ext/date/tests/DateTime_construct_error.phpt +++ b/ext/date/tests/DateTime_construct_error.phpt @@ -18,7 +18,7 @@ $timezone = timezone_open("GMT"); $extra_arg = 99; try { var_dump( new DateTime($time, $timezone, $extra_arg) ); -} catch (TypeException $e) { +} catch (TypeError $e) { echo $e->getMessage(), "\n"; } diff --git a/ext/date/tests/DateTime_construct_variation1.phpt b/ext/date/tests/DateTime_construct_variation1.phpt index 6f149ae207578..8ff7f7e89cb69 100644 --- a/ext/date/tests/DateTime_construct_variation1.phpt +++ b/ext/date/tests/DateTime_construct_variation1.phpt @@ -102,14 +102,14 @@ foreach($inputs as $variation =>$time) { try { var_dump( new DateTime($time) ); - } catch (BaseException $e) { + } catch (Throwable $e) { $msg = $e->getMessage(); echo "FAILED: " . $msg . "\n"; } try { var_dump( new DateTime($time, $timezone) ); - } catch (BaseException$e) { + } catch (Throwable $e) { $msg = $e->getMessage(); echo "FAILED: " . $msg . "\n"; } diff --git a/ext/date/tests/DateTime_construct_variation2.phpt b/ext/date/tests/DateTime_construct_variation2.phpt index d134d8f6cf33b..e75e14d8e30ef 100644 --- a/ext/date/tests/DateTime_construct_variation2.phpt +++ b/ext/date/tests/DateTime_construct_variation2.phpt @@ -102,7 +102,7 @@ foreach($inputs as $variation =>$timezone) { try { var_dump( new DateTime($time, $timezone) ); - } catch (BaseException $e) { + } catch (Throwable $e) { $msg = $e->getMessage(); echo "FAILED: " . $msg . "\n"; } diff --git a/ext/date/tests/timezone_offset_get_error.phpt b/ext/date/tests/timezone_offset_get_error.phpt index 653625dd3450c..7ce1ade30ad82 100644 --- a/ext/date/tests/timezone_offset_get_error.phpt +++ b/ext/date/tests/timezone_offset_get_error.phpt @@ -26,7 +26,7 @@ echo "*** Testing timezone_offset_get() : error conditions ***\n"; echo "\n-- Testing timezone_offset_get() function with zero arguments --\n"; try { var_dump( timezone_offset_get() ); -} catch (EngineException $ex) { +} catch (Error $ex) { var_dump($ex->getMessage()); echo "\n"; } @@ -34,7 +34,7 @@ try { echo "\n-- Testing timezone_offset_get() function with less than expected no. of arguments --\n"; try { var_dump( timezone_offset_get($tz) ); -} catch (EngineException $ex) { +} catch (Error $ex) { var_dump($ex->getMessage()); echo "\n"; } @@ -43,7 +43,7 @@ echo "\n-- Testing timezone_offset_get() function with more than expected no. of $extra_arg = 99; try { var_dump( timezone_offset_get($tz, $date, $extra_arg) ); -} catch (EngineException $ex) { +} catch (Error $ex) { var_dump($ex->getMessage()); echo "\n"; } @@ -52,21 +52,21 @@ echo "\n-- Testing timezone_offset_get() function with an invalid values for \$o $invalid_obj = new stdClass(); try { var_dump( timezone_offset_get($invalid_obj, $date) ); -} catch (EngineException $ex) { +} catch (Error $ex) { var_dump($ex->getMessage()); echo "\n"; } $invalid_obj = 10; try { var_dump( timezone_offset_get($invalid_obj, $date) ); -} catch (EngineException $ex) { +} catch (Error $ex) { var_dump($ex->getMessage()); echo "\n"; } $invalid_obj = null; try { var_dump( timezone_offset_get($invalid_obj, $date) ); -} catch (EngineException $ex) { +} catch (Error $ex) { var_dump($ex->getMessage()); echo "\n"; } @@ -75,21 +75,21 @@ echo "\n-- Testing timezone_offset_get() function with an invalid values for \$d $invalid_obj = new stdClass(); try { var_dump( timezone_offset_get($tz, $invalid_obj) ); -} catch (EngineException $ex) { +} catch (Error $ex) { var_dump($ex->getMessage()); echo "\n"; } $invalid_obj = 10; try { var_dump( timezone_offset_get($tz, $invalid_obj) ); -} catch (EngineException $ex) { +} catch (Error $ex) { var_dump($ex->getMessage()); echo "\n"; } $invalid_obj = null; try { var_dump( timezone_offset_get($tz, $invalid_obj) ); -} catch (EngineException $ex) { +} catch (Error $ex) { var_dump($ex->getMessage()); echo "\n"; } diff --git a/ext/date/tests/timezone_offset_get_variation1.phpt b/ext/date/tests/timezone_offset_get_variation1.phpt index d2cfeedaafad1..edeeb7fea75d7 100644 --- a/ext/date/tests/timezone_offset_get_variation1.phpt +++ b/ext/date/tests/timezone_offset_get_variation1.phpt @@ -109,7 +109,7 @@ foreach($inputs as $variation =>$object) { echo "\n-- $variation --\n"; try { var_dump( timezone_offset_get($object, $datetime) ); - } catch (EngineException $ex) { + } catch (Error $ex) { echo $ex->getMessage()."\n"; } }; diff --git a/ext/date/tests/timezone_offset_get_variation2.phpt b/ext/date/tests/timezone_offset_get_variation2.phpt index 8191e18ee7bb4..2d007d5e705e9 100644 --- a/ext/date/tests/timezone_offset_get_variation2.phpt +++ b/ext/date/tests/timezone_offset_get_variation2.phpt @@ -109,7 +109,7 @@ foreach($inputs as $variation =>$datetime) { echo "\n-- $variation --\n"; try { var_dump( timezone_offset_get($object, $datetime) ); - } catch (EngineException $ex) { + } catch (Error $ex) { echo $ex->getMessage()."\n"; } }; diff --git a/ext/dom/tests/DOMAttr_construct_error_001.phpt b/ext/dom/tests/DOMAttr_construct_error_001.phpt index 53780c3321b87..64e6835f9690a 100644 --- a/ext/dom/tests/DOMAttr_construct_error_001.phpt +++ b/ext/dom/tests/DOMAttr_construct_error_001.phpt @@ -9,7 +9,7 @@ Josh Sweeney getMessage(), "\n"; } ?> diff --git a/ext/dom/tests/DOMCDATASection_construct_error_001.phpt b/ext/dom/tests/DOMCDATASection_construct_error_001.phpt index 2be1e5204f6d5..fbce3c752704d 100644 --- a/ext/dom/tests/DOMCDATASection_construct_error_001.phpt +++ b/ext/dom/tests/DOMCDATASection_construct_error_001.phpt @@ -9,7 +9,7 @@ Nic Rosental nicrosental@gmail.com getMessage(); } ?> diff --git a/ext/dom/tests/DOMComment_construct_error_001.phpt b/ext/dom/tests/DOMComment_construct_error_001.phpt index e2f0b19a72c20..27424c35e441b 100644 --- a/ext/dom/tests/DOMComment_construct_error_001.phpt +++ b/ext/dom/tests/DOMComment_construct_error_001.phpt @@ -9,7 +9,7 @@ Eric Lee Stewart getMessage(), "\n"; } ?> diff --git a/ext/dom/tests/DOMDocumentFragment_construct_error_001.phpt b/ext/dom/tests/DOMDocumentFragment_construct_error_001.phpt index d9376a3251800..c84689ad8e286 100644 --- a/ext/dom/tests/DOMDocumentFragment_construct_error_001.phpt +++ b/ext/dom/tests/DOMDocumentFragment_construct_error_001.phpt @@ -9,7 +9,7 @@ Eric Lee Stewart getMessage(), "\n"; } ?> diff --git a/ext/dom/tests/DOMDocument_saveHTMLFile_error2.phpt b/ext/dom/tests/DOMDocument_saveHTMLFile_error2.phpt index 2ef17926aa45c..5feac218cfb92 100644 --- a/ext/dom/tests/DOMDocument_saveHTMLFile_error2.phpt +++ b/ext/dom/tests/DOMDocument_saveHTMLFile_error2.phpt @@ -12,7 +12,7 @@ require_once dirname(__FILE__) .'/skipif.inc'; DOMDocument::saveHTMLFile(); ?> --EXPECTF-- -Fatal error: Uncaught exception 'EngineException' with message 'Non-static method DOMDocument::saveHTMLFile() cannot be called statically' in %s:%d +Fatal error: Uncaught exception 'Error' with message 'Non-static method DOMDocument::saveHTMLFile() cannot be called statically' in %s:%d Stack trace: #0 {main} thrown in %s on line %d diff --git a/ext/dom/tests/DOMDocument_saveHTML_error2.phpt b/ext/dom/tests/DOMDocument_saveHTML_error2.phpt index 1f7c95c6ae594..c7d2c6dda4d2a 100644 --- a/ext/dom/tests/DOMDocument_saveHTML_error2.phpt +++ b/ext/dom/tests/DOMDocument_saveHTML_error2.phpt @@ -12,7 +12,7 @@ require_once dirname(__FILE__) .'/skipif.inc'; DOMDocument::saveHTML(true); ?> --EXPECTF-- -Fatal error: Uncaught exception 'EngineException' with message 'Non-static method DOMDocument::saveHTML() cannot be called statically' in %s:%d +Fatal error: Uncaught exception 'Error' with message 'Non-static method DOMDocument::saveHTML() cannot be called statically' in %s:%d Stack trace: #0 {main} thrown in %s on line %d diff --git a/ext/dom/tests/DOMDocument_validate_error2.phpt b/ext/dom/tests/DOMDocument_validate_error2.phpt index 0ef15691de801..24f39e3fb4ba2 100644 --- a/ext/dom/tests/DOMDocument_validate_error2.phpt +++ b/ext/dom/tests/DOMDocument_validate_error2.phpt @@ -12,7 +12,7 @@ require_once dirname(__FILE__) .'/skipif.inc'; DOMDocument::validate(); ?> --EXPECTF-- -Fatal error: Uncaught exception 'EngineException' with message 'Non-static method DOMDocument::validate() cannot be called statically' in %s:%d +Fatal error: Uncaught exception 'Error' with message 'Non-static method DOMDocument::validate() cannot be called statically' in %s:%d Stack trace: #0 {main} thrown in %s on line %d diff --git a/ext/dom/tests/dom003.phpt b/ext/dom/tests/dom003.phpt index 37db1f7677386..060a2c184e9c2 100644 --- a/ext/dom/tests/dom003.phpt +++ b/ext/dom/tests/dom003.phpt @@ -28,13 +28,13 @@ $rootNode->appendChild($rootNode); object(DOMException)#%d (%d) { ["message":protected]=> string(23) "Hierarchy Request Error" - ["string":"BaseException":private]=> + ["string":"Exception":private]=> string(0) "" ["file":protected]=> string(%d) "%sdom003.php" ["line":protected]=> int(8) - ["trace":"BaseException":private]=> + ["trace":"Exception":private]=> array(1) { [0]=> array(6) { @@ -55,7 +55,7 @@ object(DOMException)#%d (%d) { } } } - ["previous":"BaseException":private]=> + ["previous":"Exception":private]=> NULL ["code"]=> int(3) diff --git a/ext/dom/tests/dom_set_attr_node.phpt b/ext/dom/tests/dom_set_attr_node.phpt index 1c4960615cf8f..1916cd524af3e 100644 --- a/ext/dom/tests/dom_set_attr_node.phpt +++ b/ext/dom/tests/dom_set_attr_node.phpt @@ -40,13 +40,13 @@ ob_start(); object(DOMException)#%d (7) { ["message":protected]=> string(20) "Wrong Document Error" - ["string":"BaseException":private]=> + ["string":"Exception":private]=> string(0) "" ["file":protected]=> string(%d) "%sdom_set_attr_node.php" ["line":protected]=> int(%d) - ["trace":"BaseException":private]=> + ["trace":"Exception":private]=> array(1) { [0]=> array(6) { @@ -67,7 +67,7 @@ object(DOMException)#%d (7) { } } } - ["previous":"BaseException":private]=> + ["previous":"Exception":private]=> NULL ["code"]=> int(4) diff --git a/ext/dom/tests/regsiter_node_class.phpt b/ext/dom/tests/regsiter_node_class.phpt index 7fff3bfacfc4b..91a5475ca2a80 100644 --- a/ext/dom/tests/regsiter_node_class.phpt +++ b/ext/dom/tests/regsiter_node_class.phpt @@ -37,7 +37,7 @@ myAttribute HELLO Attribute DOMAttr -Fatal error: Uncaught exception 'EngineException' with message 'Call to undefined method DOMAttr::testit()' in %s:25 +Fatal error: Uncaught exception 'Error' with message 'Call to undefined method DOMAttr::testit()' in %s:25 Stack trace: #0 {main} thrown in %s on line 25 diff --git a/ext/fileinfo/tests/bug61173.phpt b/ext/fileinfo/tests/bug61173.phpt index 4b622c65ae92a..96eb3010e0324 100644 --- a/ext/fileinfo/tests/bug61173.phpt +++ b/ext/fileinfo/tests/bug61173.phpt @@ -10,7 +10,7 @@ if (!class_exists('finfo')) try { $finfo = new finfo(1, '', false); var_dump($finfo); -} catch (TypeException $e) { +} catch (TypeError $e) { echo $e->getMessage(), "\n"; } --EXPECTF-- diff --git a/ext/fileinfo/tests/finfo_open_error.phpt b/ext/fileinfo/tests/finfo_open_error.phpt index 1f6f935247c45..511df600c1443 100644 --- a/ext/fileinfo/tests/finfo_open_error.phpt +++ b/ext/fileinfo/tests/finfo_open_error.phpt @@ -22,7 +22,7 @@ var_dump( finfo_open( 'foobar' ) ); try { var_dump( new finfo('foobar') ); -} catch (TypeException $e) { +} catch (TypeError $e) { echo $e->getMessage(), "\n"; } diff --git a/ext/intl/tests/badargs.phpt b/ext/intl/tests/badargs.phpt index 300ac2653e5aa..d6ce48317b0c5 100644 --- a/ext/intl/tests/badargs.phpt +++ b/ext/intl/tests/badargs.phpt @@ -18,7 +18,7 @@ foreach($funcs as $func) { $res = $func($arg); } catch (Exception $e) { continue; - } catch (EngineException $e) { + } catch (Error $e) { continue; } if($res != false) { diff --git a/ext/intl/tests/breakiter___construct.phpt b/ext/intl/tests/breakiter___construct.phpt index a1e59ddf5da94..6569c25a6f2c4 100644 --- a/ext/intl/tests/breakiter___construct.phpt +++ b/ext/intl/tests/breakiter___construct.phpt @@ -11,7 +11,7 @@ ini_set("intl.error_level", E_WARNING); new IntlBreakIterator(); --EXPECTF-- -Fatal error: Uncaught exception 'EngineException' with message 'Call to private IntlBreakIterator::__construct() from invalid context' in %s:%d +Fatal error: Uncaught exception 'Error' with message 'Call to private IntlBreakIterator::__construct() from invalid context' in %s:%d Stack trace: #0 {main} thrown in %s on line %d diff --git a/ext/intl/tests/breakiter___construct_error.phpt b/ext/intl/tests/breakiter___construct_error.phpt index 7e67fd7403361..1e865cc9d9e2d 100644 --- a/ext/intl/tests/breakiter___construct_error.phpt +++ b/ext/intl/tests/breakiter___construct_error.phpt @@ -19,17 +19,17 @@ try { } try { var_dump(new IntlRuleBasedBreakIterator()); -} catch (TypeException $e) { +} catch (TypeError $e) { print_exception($e); } try { var_dump(new IntlRuleBasedBreakIterator(1,2,3)); -} catch (TypeException $e) { +} catch (TypeError $e) { print_exception($e); } try { var_dump(new IntlRuleBasedBreakIterator('[\p{Letter}\uFFFD]+;[:number:]+;', array())); -} catch (TypeException $e) { +} catch (TypeError $e) { print_exception($e); } try { diff --git a/ext/intl/tests/calendar_before_after_error.phpt b/ext/intl/tests/calendar_before_after_error.phpt index b5f3c746c1b0a..938c7a5fb7f7d 100644 --- a/ext/intl/tests/calendar_before_after_error.phpt +++ b/ext/intl/tests/calendar_before_after_error.phpt @@ -19,45 +19,45 @@ set_error_handler('eh'); try { var_dump($c->after()); -} catch (EngineException $ex) { +} catch (Error $ex) { echo "error: " . $ex->getCode() . ", " . $ex->getMessage() . "\n\n"; } try { var_dump($c->before()); -} catch (EngineException $ex) { +} catch (Error $ex) { echo "error: " . $ex->getCode() . ", " . $ex->getMessage() . "\n\n"; } try { var_dump($c->after(1)); -} catch (EngineException $ex) { +} catch (Error $ex) { echo "error: " . $ex->getCode() . ", " . $ex->getMessage() . "\n\n"; } try { var_dump($c->before(1)); -} catch (EngineException $ex) { +} catch (Error $ex) { echo "error: " . $ex->getCode() . ", " . $ex->getMessage() . "\n\n"; } try{ var_dump($c->after($c, 1)); -} catch (EngineException $ex) { +} catch (Error $ex) { echo "error: " . $ex->getCode() . ", " . $ex->getMessage() . "\n\n"; } try { var_dump($c->before($c, 1)); -} catch (EngineException $ex) { +} catch (Error $ex) { echo "error: " . $ex->getCode() . ", " . $ex->getMessage() . "\n\n"; } try { var_dump(intlcal_after($c)); -} catch (EngineException $ex) { +} catch (Error $ex) { echo "error: " . $ex->getCode() . ", " . $ex->getMessage() . "\n\n"; } try { var_dump(intlcal_before($c)); -} catch (EngineException $ex) { +} catch (Error $ex) { echo "error: " . $ex->getCode() . ", " . $ex->getMessage() . "\n\n"; } --EXPECT-- diff --git a/ext/intl/tests/calendar_equals_error.phpt b/ext/intl/tests/calendar_equals_error.phpt index 0293bd7bcba50..8465541c87584 100644 --- a/ext/intl/tests/calendar_equals_error.phpt +++ b/ext/intl/tests/calendar_equals_error.phpt @@ -19,29 +19,29 @@ set_error_handler('eh'); try { var_dump($c->equals()); -} catch (EngineException $ex) { +} catch (Error $ex) { echo "error: " . $ex->getCode() . ", " . $ex->getMessage() . "\n\n"; } try { var_dump($c->equals(new stdclass)); -} catch (EngineException $ex) { +} catch (Error $ex) { echo "error: " . $ex->getCode() . ", " . $ex->getMessage() . "\n\n"; } try { var_dump($c->equals(1, 2)); -} catch (EngineException $ex) { +} catch (Error $ex) { echo "error: " . $ex->getCode() . ", " . $ex->getMessage() . "\n\n"; } try { var_dump(intlcal_equals($c, array())); -} catch (EngineException $ex) { +} catch (Error $ex) { echo "error: " . $ex->getCode() . ", " . $ex->getMessage() . "\n\n"; } try { var_dump(intlcal_equals(1, $c)); -} catch (EngineException $ex) { +} catch (Error $ex) { echo "error: " . $ex->getCode() . ", " . $ex->getMessage() . "\n\n"; } diff --git a/ext/intl/tests/calendar_get_Least_Greatest_Minimum_Maximum_error.phpt b/ext/intl/tests/calendar_get_Least_Greatest_Minimum_Maximum_error.phpt index 0764fe267d943..3d881a781da00 100644 --- a/ext/intl/tests/calendar_get_Least_Greatest_Minimum_Maximum_error.phpt +++ b/ext/intl/tests/calendar_get_Least_Greatest_Minimum_Maximum_error.phpt @@ -34,22 +34,22 @@ set_error_handler('eh'); try { var_dump(intlcal_get_least_maximum(1, 1)); -} catch (EngineException $ex) { +} catch (Error $ex) { echo "error: " . $ex->getCode() . ", " . $ex->getMessage() . "\n\n"; } try { var_dump(intlcal_get_maximum(1, 1)); -} catch (EngineException $ex) { +} catch (Error $ex) { echo "error: " . $ex->getCode() . ", " . $ex->getMessage() . "\n\n"; } try { var_dump(intlcal_get_greatest_minimum(1, -1)); -} catch (EngineException $ex) { +} catch (Error $ex) { echo "error: " . $ex->getCode() . ", " . $ex->getMessage() . "\n\n"; } try { var_dump(intlcal_get_minimum(1, -1)); -} catch (EngineException $ex) { +} catch (Error $ex) { echo "error: " . $ex->getCode() . ", " . $ex->getMessage() . "\n\n"; } diff --git a/ext/intl/tests/calendar_get_getActualMaximum_Minumum_error2.phpt b/ext/intl/tests/calendar_get_getActualMaximum_Minumum_error2.phpt index e117f03a57305..b29e8ed0cb8a7 100644 --- a/ext/intl/tests/calendar_get_getActualMaximum_Minumum_error2.phpt +++ b/ext/intl/tests/calendar_get_getActualMaximum_Minumum_error2.phpt @@ -19,65 +19,65 @@ set_error_handler('eh'); try { var_dump(intlcal_get($c)); -} catch (EngineException $ex) { +} catch (Error $ex) { echo "error: " . $ex->getCode() . ", " . $ex->getMessage() . "\n\n"; } try { var_dump(intlcal_get_actual_maximum($c)); -} catch (EngineException $ex) { +} catch (Error $ex) { echo "error: " . $ex->getCode() . ", " . $ex->getMessage() . "\n\n"; } try { var_dump(intlcal_get_actual_minimum($c)); -} catch (EngineException $ex) { +} catch (Error $ex) { echo "error: " . $ex->getCode() . ", " . $ex->getMessage() . "\n\n"; } try { var_dump(intlcal_get($c, -1)); -} catch (EngineException $ex) { +} catch (Error $ex) { echo "error: " . $ex->getCode() . ", " . $ex->getMessage() . "\n\n"; } try { var_dump(intlcal_get_actual_maximum($c, -1)); -} catch (EngineException $ex) { +} catch (Error $ex) { echo "error: " . $ex->getCode() . ", " . $ex->getMessage() . "\n\n"; } try { var_dump(intlcal_get_actual_minimum($c, -1)); -} catch (EngineException $ex) { +} catch (Error $ex) { echo "error: " . $ex->getCode() . ", " . $ex->getMessage() . "\n\n"; } try { var_dump(intlcal_get($c, "s")); -} catch (EngineException $ex) { +} catch (Error $ex) { echo "error: " . $ex->getCode() . ", " . $ex->getMessage() . "\n\n"; } try { var_dump(intlcal_get_actual_maximum($c, "s")); -} catch (EngineException $ex) { +} catch (Error $ex) { echo "error: " . $ex->getCode() . ", " . $ex->getMessage() . "\n\n"; } try { var_dump(intlcal_get_actual_minimum($c, "s")); -} catch (EngineException $ex) { +} catch (Error $ex) { echo "error: " . $ex->getCode() . ", " . $ex->getMessage() . "\n\n"; } try { var_dump(intlcal_get(1)); -} catch (EngineException $ex) { +} catch (Error $ex) { echo "error: " . $ex->getCode() . ", " . $ex->getMessage() . "\n\n"; } try { var_dump(intlcal_get_actual_maximum(1)); -} catch (EngineException $ex) { +} catch (Error $ex) { echo "error: " . $ex->getCode() . ", " . $ex->getMessage() . "\n\n"; } try { var_dump(intlcal_get_actual_minimum(1)); -} catch (EngineException $ex) { +} catch (Error $ex) { echo "error: " . $ex->getCode() . ", " . $ex->getMessage() . "\n\n"; } --EXPECT-- diff --git a/ext/intl/tests/calendar_isEquivalentTo_error.phpt b/ext/intl/tests/calendar_isEquivalentTo_error.phpt index 740b07b1fee18..ac19e1dd90594 100644 --- a/ext/intl/tests/calendar_isEquivalentTo_error.phpt +++ b/ext/intl/tests/calendar_isEquivalentTo_error.phpt @@ -19,33 +19,33 @@ set_error_handler('eh'); try { var_dump($c->isEquivalentTo(0)); -} catch (EngineException $ex) { +} catch (Error $ex) { echo "error: " . $ex->getCode() . ", " . $ex->getMessage() . "\n\n"; } try { var_dump($c->isEquivalentTo($c, 1)); -} catch (EngineException $ex) { +} catch (Error $ex) { echo "error: " . $ex->getCode() . ", " . $ex->getMessage() . "\n\n"; } try { var_dump($c->isEquivalentTo(1)); -} catch (EngineException $ex) { +} catch (Error $ex) { echo "error: " . $ex->getCode() . ", " . $ex->getMessage() . "\n\n"; } try { var_dump(intlcal_is_equivalent_to($c)); -} catch (EngineException $ex) { +} catch (Error $ex) { echo "error: " . $ex->getCode() . ", " . $ex->getMessage() . "\n\n"; } try { var_dump(intlcal_is_equivalent_to($c, 1)); -} catch (EngineException $ex) { +} catch (Error $ex) { echo "error: " . $ex->getCode() . ", " . $ex->getMessage() . "\n\n"; } try { var_dump(intlcal_is_equivalent_to(1, $c)); -} catch (EngineException $ex) { +} catch (Error $ex) { echo "error: " . $ex->getCode() . ", " . $ex->getMessage() . "\n\n"; } diff --git a/ext/intl/tests/calendar_setTimeZone_error.phpt b/ext/intl/tests/calendar_setTimeZone_error.phpt index 6230efad8add9..410dc86c60073 100644 --- a/ext/intl/tests/calendar_setTimeZone_error.phpt +++ b/ext/intl/tests/calendar_setTimeZone_error.phpt @@ -21,23 +21,23 @@ set_error_handler('eh'); try { var_dump($c->setTimeZone($gmt, 2)); -} catch (EngineException $ex) { +} catch (Error $ex) { echo "error: " . $ex->getCode() . ", " . $ex->getMessage() . "\n\n"; } try { var_dump($c->setTimeZone()); -} catch (EngineException $ex) { +} catch (Error $ex) { echo "error: " . $ex->getCode() . ", " . $ex->getMessage() . "\n\n"; } try{ var_dump(intlcal_set_time_zone($c, 1, 2)); -} catch (EngineException $ex) { +} catch (Error $ex) { echo "error: " . $ex->getCode() . ", " . $ex->getMessage() . "\n\n"; } try{ var_dump(intlcal_set_time_zone(1, $gmt)); -} catch (EngineException $ex) { +} catch (Error $ex) { echo "error: " . $ex->getCode() . ", " . $ex->getMessage() . "\n\n"; } diff --git a/ext/intl/tests/formatter_fail.phpt b/ext/intl/tests/formatter_fail.phpt index f7761173dd738..2e3360f3c7434 100644 --- a/ext/intl/tests/formatter_fail.phpt +++ b/ext/intl/tests/formatter_fail.phpt @@ -45,7 +45,7 @@ $args = array( try { $fmt = new NumberFormatter(); -} catch (TypeException $e) { +} catch (TypeError $e) { print_exception($e); $fmt = null; } @@ -66,7 +66,7 @@ foreach($args as $arg) { ?> --EXPECTF-- -TypeException: NumberFormatter::__construct() expects at least 2 parameters, 0 given in %s on line %d +TypeError: NumberFormatter::__construct() expects at least 2 parameters, 0 given in %s on line %d 'numfmt_create: unable to parse input parameters: U_ILLEGAL_ARGUMENT_ERROR' Warning: numfmt_create() expects at least 2 parameters, 0 given in %s on line %d @@ -80,7 +80,7 @@ IntlException: Constructor failed in %sformatter_fail.php on line %d 'numfmt_create: number formatter creation failed: U_UNSUPPORTED_ERROR' 'numfmt_create: number formatter creation failed: U_UNSUPPORTED_ERROR' -TypeException: NumberFormatter::__construct() expects parameter 1 to be string, array given in %s on line %d +TypeError: NumberFormatter::__construct() expects parameter 1 to be string, array given in %s on line %d 'numfmt_create: unable to parse input parameters: U_ILLEGAL_ARGUMENT_ERROR' Warning: NumberFormatter::create() expects parameter 1 to be string, array given in %s on line %d diff --git a/ext/intl/tests/gregoriancalendar___construct_error.phpt b/ext/intl/tests/gregoriancalendar___construct_error.phpt index 7383bdee88675..ccc87d9703ec1 100644 --- a/ext/intl/tests/gregoriancalendar___construct_error.phpt +++ b/ext/intl/tests/gregoriancalendar___construct_error.phpt @@ -22,7 +22,7 @@ try { } try { var_dump(new IntlGregorianCalendar(1,2,3,4,NULL,array())); -} catch (TypeException $e) { +} catch (TypeError $e) { print_exception($e); } --EXPECTF-- diff --git a/ext/intl/tests/msgfmt_fail.phpt b/ext/intl/tests/msgfmt_fail.phpt index d7ca83d4424c5..8ee72d1ef5964 100644 --- a/ext/intl/tests/msgfmt_fail.phpt +++ b/ext/intl/tests/msgfmt_fail.phpt @@ -47,7 +47,7 @@ $args = array( try { $fmt = new MessageFormatter(); -} catch (TypeException $e) { +} catch (TypeError $e) { print_exception($e); $fmt = null; } @@ -58,7 +58,7 @@ $fmt = MessageFormatter::create(); err($fmt); try { $fmt = new MessageFormatter('en'); -} catch (TypeException $e) { +} catch (TypeError $e) { print_exception($e); $fmt = null; } @@ -79,7 +79,7 @@ foreach($args as $arg) { ?> --EXPECTF-- -TypeException: MessageFormatter::__construct() expects exactly 2 parameters, 0 given in %s on line %d +TypeError: MessageFormatter::__construct() expects exactly 2 parameters, 0 given in %s on line %d 'msgfmt_create: unable to parse input parameters: U_ILLEGAL_ARGUMENT_ERROR' Warning: msgfmt_create() expects exactly 2 parameters, 0 given in %s on line %d @@ -88,7 +88,7 @@ Warning: msgfmt_create() expects exactly 2 parameters, 0 given in %s on line %d Warning: MessageFormatter::create() expects exactly 2 parameters, 0 given in %s on line %d 'msgfmt_create: unable to parse input parameters: U_ILLEGAL_ARGUMENT_ERROR' -TypeException: MessageFormatter::__construct() expects exactly 2 parameters, 1 given in %s on line %d +TypeError: MessageFormatter::__construct() expects exactly 2 parameters, 1 given in %s on line %d 'msgfmt_create: unable to parse input parameters: U_ILLEGAL_ARGUMENT_ERROR' Warning: msgfmt_create() expects exactly 2 parameters, 1 given in %s on line %d @@ -107,7 +107,7 @@ IntlException: Constructor failed in %smsgfmt_fail2.php on line %d 'msgfmt_create: message formatter creation failed: U_ILLEGAL_ARGUMENT_ERROR' 'msgfmt_create: message formatter creation failed: U_ILLEGAL_ARGUMENT_ERROR' -TypeException: MessageFormatter::__construct() expects parameter 1 to be string, array given in %s on line %d +TypeError: MessageFormatter::__construct() expects parameter 1 to be string, array given in %s on line %d 'msgfmt_create: unable to parse input parameters: U_ILLEGAL_ARGUMENT_ERROR' Warning: MessageFormatter::create() expects parameter 1 to be string, array given in %s on line %d diff --git a/ext/intl/tests/msgfmt_fail2.phpt b/ext/intl/tests/msgfmt_fail2.phpt index 6e34bfde68821..87c1edec75e78 100644 --- a/ext/intl/tests/msgfmt_fail2.phpt +++ b/ext/intl/tests/msgfmt_fail2.phpt @@ -47,7 +47,7 @@ $args = array( try { $fmt = new MessageFormatter(); -} catch (TypeException $e) { +} catch (TypeError $e) { print_exception($e); $fmt = null; } @@ -58,7 +58,7 @@ $fmt = MessageFormatter::create(); err($fmt); try { $fmt = new MessageFormatter('en'); -} catch (TypeException $e) { +} catch (TypeError $e) { print_exception($e); $fmt = null; } @@ -79,7 +79,7 @@ foreach($args as $arg) { ?> --EXPECTF-- -TypeException: MessageFormatter::__construct() expects exactly 2 parameters, 0 given in %s on line %d +TypeError: MessageFormatter::__construct() expects exactly 2 parameters, 0 given in %s on line %d 'msgfmt_create: unable to parse input parameters: U_ILLEGAL_ARGUMENT_ERROR' Warning: msgfmt_create() expects exactly 2 parameters, 0 given in %s on line %d @@ -88,7 +88,7 @@ Warning: msgfmt_create() expects exactly 2 parameters, 0 given in %s on line %d Warning: MessageFormatter::create() expects exactly 2 parameters, 0 given in %s on line %d 'msgfmt_create: unable to parse input parameters: U_ILLEGAL_ARGUMENT_ERROR' -TypeException: MessageFormatter::__construct() expects exactly 2 parameters, 1 given in %s on line %d +TypeError: MessageFormatter::__construct() expects exactly 2 parameters, 1 given in %s on line %d 'msgfmt_create: unable to parse input parameters: U_ILLEGAL_ARGUMENT_ERROR' Warning: msgfmt_create() expects exactly 2 parameters, 1 given in %s on line %d @@ -107,7 +107,7 @@ IntlException: Constructor failed in %smsgfmt_fail2.php on line %d 'msgfmt_create: message formatter creation failed: U_ILLEGAL_ARGUMENT_ERROR' 'msgfmt_create: message formatter creation failed: U_ILLEGAL_ARGUMENT_ERROR' -TypeException: MessageFormatter::__construct() expects parameter 1 to be string, array given in %s on line %d +TypeError: MessageFormatter::__construct() expects parameter 1 to be string, array given in %s on line %d 'msgfmt_create: unable to parse input parameters: U_ILLEGAL_ARGUMENT_ERROR' Warning: MessageFormatter::create() expects parameter 1 to be string, array given in %s on line %d diff --git a/ext/intl/tests/timezone_getCanonicalID_error.phpt b/ext/intl/tests/timezone_getCanonicalID_error.phpt index 7fe2f61d514c8..07d3af1865df7 100644 --- a/ext/intl/tests/timezone_getCanonicalID_error.phpt +++ b/ext/intl/tests/timezone_getCanonicalID_error.phpt @@ -29,7 +29,7 @@ bool(false) Warning: IntlTimeZone::getCanonicalID(): intltz_get_canonical_id: could not convert time zone id to UTF-16 in %s on line %d bool(false) -Fatal error: Uncaught exception 'EngineException' with message 'Cannot pass parameter 2 by reference' in %s:%d +Fatal error: Uncaught exception 'Error' with message 'Cannot pass parameter 2 by reference' in %s:%d Stack trace: #0 {main} thrown in %s on line %d diff --git a/ext/intl/tests/timezone_hasSameRules_error.phpt b/ext/intl/tests/timezone_hasSameRules_error.phpt index d3c25661e3f05..5fb5bdde7aeb2 100644 --- a/ext/intl/tests/timezone_hasSameRules_error.phpt +++ b/ext/intl/tests/timezone_hasSameRules_error.phpt @@ -18,14 +18,14 @@ set_error_handler("error_handler"); $tz = IntlTimeZone::createTimeZone('Europe/Lisbon'); try { var_dump($tz->hasSameRules('foo')); -} catch (EngineException $ex) { +} catch (Error $ex) { var_dump($ex->getCode(), $ex->getMessage()); echo "\n"; } try { var_dump(intltz_has_same_rules(null, $tz)); -} catch (EngineException $ex) { +} catch (Error $ex) { var_dump($ex->getCode(), $ex->getMessage()); echo "\n"; } diff --git a/ext/mysqli/tests/bug33491.phpt b/ext/mysqli/tests/bug33491.phpt index dbb3b7218c613..b282d567ecf86 100644 --- a/ext/mysqli/tests/bug33491.phpt +++ b/ext/mysqli/tests/bug33491.phpt @@ -26,7 +26,7 @@ $DB->query_single('SELECT DATE()'); ?> --EXPECTF-- -Fatal error: Uncaught exception 'EngineException' with message 'Call to a member function fetch_row() on boolean' in %sbug33491.php:%d +Fatal error: Uncaught exception 'Error' with message 'Call to a member function fetch_row() on boolean' in %sbug33491.php:%d Stack trace: #0 %s(%d): DB->query_single('SELECT DATE()') #1 {main} diff --git a/ext/mysqli/tests/bug38003.phpt b/ext/mysqli/tests/bug38003.phpt index f1efa56b30173..cde888920eb1c 100644 --- a/ext/mysqli/tests/bug38003.phpt +++ b/ext/mysqli/tests/bug38003.phpt @@ -17,7 +17,7 @@ $DB = new DB(); echo "Done\n"; ?> --EXPECTF-- -Fatal error: Uncaught exception 'EngineException' with message 'Call to private DB::__construct() from invalid context' in %s:%d +Fatal error: Uncaught exception 'Error' with message 'Call to private DB::__construct() from invalid context' in %s:%d Stack trace: #0 {main} thrown in %s on line %d diff --git a/ext/mysqli/tests/mysqli_driver_unclonable.phpt b/ext/mysqli/tests/mysqli_driver_unclonable.phpt index fe3a91af63133..f9ce927abb3b7 100644 --- a/ext/mysqli/tests/mysqli_driver_unclonable.phpt +++ b/ext/mysqli/tests/mysqli_driver_unclonable.phpt @@ -10,7 +10,7 @@ Trying to clone mysqli_driver object print "done!"; ?> --EXPECTF-- -Fatal error: Uncaught exception 'EngineException' with message 'Trying to clone an uncloneable object of class mysqli_driver' in %s:%d +Fatal error: Uncaught exception 'Error' with message 'Trying to clone an uncloneable object of class mysqli_driver' in %s:%d Stack trace: #0 {main} thrown in %s on line %d \ No newline at end of file diff --git a/ext/mysqli/tests/mysqli_fetch_object.phpt b/ext/mysqli/tests/mysqli_fetch_object.phpt index 25457346d75fa..11dd0a5a4fd83 100644 --- a/ext/mysqli/tests/mysqli_fetch_object.phpt +++ b/ext/mysqli/tests/mysqli_fetch_object.phpt @@ -101,7 +101,7 @@ require_once('skipifconnectfailure.inc'); try { if (false !== ($obj = @mysqli_fetch_object($res, 'mysqli_fetch_object_construct', 'a'))) printf("[011] Should have failed\n"); - } catch (EngineException $e) { + } catch (Error $e) { handle_catchable_fatal($e->getCode(), $e->getMessage(), $e->getFile(), $e->getLine()); } diff --git a/ext/mysqli/tests/mysqli_fetch_object_no_constructor.phpt b/ext/mysqli/tests/mysqli_fetch_object_no_constructor.phpt index d0786f9e1a90a..1f6e9098fc7ae 100644 --- a/ext/mysqli/tests/mysqli_fetch_object_no_constructor.phpt +++ b/ext/mysqli/tests/mysqli_fetch_object_no_constructor.phpt @@ -62,7 +62,7 @@ Exception: Class mysqli_fetch_object_test does not have a constructor hence you Fatal error with PHP (but no exception!): -Fatal error: Uncaught exception 'EngineException' with message 'Call to undefined method mysqli_fetch_object_test::mysqli_fetch_object_test()' in %s:%d +Fatal error: Uncaught exception 'Error' with message 'Call to undefined method mysqli_fetch_object_test::mysqli_fetch_object_test()' in %s:%d Stack trace: #0 {main} thrown in %s on line %d diff --git a/ext/mysqli/tests/mysqli_fetch_object_oo.phpt b/ext/mysqli/tests/mysqli_fetch_object_oo.phpt index b5ebd110a4f14..2b3f76c993efd 100644 --- a/ext/mysqli/tests/mysqli_fetch_object_oo.phpt +++ b/ext/mysqli/tests/mysqli_fetch_object_oo.phpt @@ -34,7 +34,7 @@ require_once('skipifconnectfailure.inc'); try { if (!is_null($tmp = @$res->fetch_object($link, $link))) printf("[005] Expecting NULL, got %s/%s\n", gettype($tmp), $tmp); - } catch (EngineException $e) { + } catch (Error $e) { handle_catchable_fatal($e->getCode(), $e->getMessage(), $e->getFile(), $e->getLine()); } @@ -42,7 +42,7 @@ require_once('skipifconnectfailure.inc'); try { if (!is_null($tmp = @$res->fetch_object($link, $link, $link))) printf("[006] Expecting NULL, got %s/%s\n", gettype($tmp), $tmp); - } catch (EngineException $e) { + } catch (Error $e) { handle_catchable_fatal($e->getCode(), $e->getMessage(), $e->getFile(), $e->getLine()); } @@ -84,7 +84,7 @@ require_once('skipifconnectfailure.inc'); printf("[009] Object seems wrong. [%d] %s\n", $mysqli->errno, $mysqli->error); var_dump($obj); } - } catch (EngineException $e) { + } catch (Error $e) { handle_catchable_fatal($e->getCode(), $e->getMessage(), $e->getFile(), $e->getLine()); mysqli_fetch_object($res); } diff --git a/ext/mysqli/tests/mysqli_result_unclonable.phpt b/ext/mysqli/tests/mysqli_result_unclonable.phpt index 0b400396c7d4a..408dffa64d043 100644 --- a/ext/mysqli/tests/mysqli_result_unclonable.phpt +++ b/ext/mysqli/tests/mysqli_result_unclonable.phpt @@ -21,7 +21,7 @@ require_once('skipifconnectfailure.inc'); print "done!"; ?> --EXPECTF-- -Fatal error: Uncaught exception 'EngineException' with message 'Trying to clone an uncloneable object of class mysqli_result' in %s:%d +Fatal error: Uncaught exception 'Error' with message 'Trying to clone an uncloneable object of class mysqli_result' in %s:%d Stack trace: #0 {main} thrown in %s on line %d \ No newline at end of file diff --git a/ext/mysqli/tests/mysqli_stmt_unclonable.phpt b/ext/mysqli/tests/mysqli_stmt_unclonable.phpt index efec3dbc085a6..1c6f961e981d3 100644 --- a/ext/mysqli/tests/mysqli_stmt_unclonable.phpt +++ b/ext/mysqli/tests/mysqli_stmt_unclonable.phpt @@ -22,7 +22,7 @@ require_once('skipifconnectfailure.inc'); print "done!"; ?> --EXPECTF-- -Fatal error: Uncaught exception 'EngineException' with message 'Trying to clone an uncloneable object of class mysqli_stmt' in %s:%d +Fatal error: Uncaught exception 'Error' with message 'Trying to clone an uncloneable object of class mysqli_stmt' in %s:%d Stack trace: #0 {main} thrown in %s on line %d \ No newline at end of file diff --git a/ext/mysqli/tests/mysqli_unclonable.phpt b/ext/mysqli/tests/mysqli_unclonable.phpt index 7b54fe5e81844..bf515bc0a0609 100644 --- a/ext/mysqli/tests/mysqli_unclonable.phpt +++ b/ext/mysqli/tests/mysqli_unclonable.phpt @@ -20,7 +20,7 @@ require_once('skipifconnectfailure.inc'); print "done!"; ?> --EXPECTF-- -Fatal error: Uncaught exception 'EngineException' with message 'Trying to clone an uncloneable object of class mysqli' in %s:%d +Fatal error: Uncaught exception 'Error' with message 'Trying to clone an uncloneable object of class mysqli' in %s:%d Stack trace: #0 {main} thrown in %s on line %d \ No newline at end of file diff --git a/ext/pdo/tests/bug47769.phpt b/ext/pdo/tests/bug47769.phpt index f6f2749cc0d77..7e0ef83b95a92 100644 --- a/ext/pdo/tests/bug47769.phpt +++ b/ext/pdo/tests/bug47769.phpt @@ -34,7 +34,7 @@ this is a protected method. this is a private method. foo -Fatal error: Uncaught exception 'EngineException' with message 'Call to protected method test::isProtected() from context ''' in %s:%d +Fatal error: Uncaught exception 'Error' with message 'Call to protected method test::isProtected() from context ''' in %s:%d Stack trace: #0 {main} thrown in %s on line %d diff --git a/ext/pdo/tests/pdo_025.phpt b/ext/pdo/tests/pdo_025.phpt index 4170cec88ce99..a34197d3ca4a2 100644 --- a/ext/pdo/tests/pdo_025.phpt +++ b/ext/pdo/tests/pdo_025.phpt @@ -110,7 +110,7 @@ object(Test)#%d (3) { } ===FAIL=== -Fatal error: Uncaught exception 'EngineException' with message 'Cannot access protected property Fail::$id' in %spdo_025.php:%d +Fatal error: Uncaught exception 'Error' with message 'Cannot access protected property Fail::$id' in %spdo_025.php:%d Stack trace: #0 {main} thrown in %spdo_025.php on line %d diff --git a/ext/pdo/tests/pdo_037.phpt b/ext/pdo/tests/pdo_037.phpt index 2880a1b38a85e..98effc7d2cb2f 100644 --- a/ext/pdo/tests/pdo_037.phpt +++ b/ext/pdo/tests/pdo_037.phpt @@ -16,7 +16,7 @@ var_dump($obj->foo()); ?> --EXPECTF-- -Fatal error: Uncaught exception 'EngineException' with message 'Call to undefined method MyStatement::foo()' in %s:%d +Fatal error: Uncaught exception 'Error' with message 'Call to undefined method MyStatement::foo()' in %s:%d Stack trace: #0 {main} thrown in %s on line %d diff --git a/ext/pdo_mysql/tests/bug_37445.phpt b/ext/pdo_mysql/tests/bug_37445.phpt index 20a73ce703060..f2bd290abce1e 100644 --- a/ext/pdo_mysql/tests/bug_37445.phpt +++ b/ext/pdo_mysql/tests/bug_37445.phpt @@ -17,7 +17,7 @@ $stmt = $db->prepare("SELECT 1"); $stmt->bindParam(':a', 'b'); ?> --EXPECTF-- -Fatal error: Uncaught exception 'EngineException' with message 'Cannot pass parameter 2 by reference' in %sbug_37445.php:%d +Fatal error: Uncaught exception 'Error' with message 'Cannot pass parameter 2 by reference' in %sbug_37445.php:%d Stack trace: #0 {main} thrown in %sbug_37445.php on line %d diff --git a/ext/pdo_mysql/tests/pdo_mysql___construct.phpt b/ext/pdo_mysql/tests/pdo_mysql___construct.phpt index f0048ff305b4b..219678c671a4a 100644 --- a/ext/pdo_mysql/tests/pdo_mysql___construct.phpt +++ b/ext/pdo_mysql/tests/pdo_mysql___construct.phpt @@ -31,7 +31,7 @@ MySQLPDOTest::skip(); try { if (NULL !== ($db = @new PDO())) printf("[001] Too few parameters\n"); - } catch (TypeException $ex) { + } catch (TypeError $ex) { } print tryandcatch(2, '$db = new PDO(chr(0));'); diff --git a/ext/pdo_mysql/tests/pdo_mysql___construct_options.phpt b/ext/pdo_mysql/tests/pdo_mysql___construct_options.phpt index 9a64f59fe20d6..62051d7ae2c44 100644 --- a/ext/pdo_mysql/tests/pdo_mysql___construct_options.phpt +++ b/ext/pdo_mysql/tests/pdo_mysql___construct_options.phpt @@ -70,7 +70,7 @@ MySQLPDOTest::skip(); try { if (NULL !== ($db = @new PDO($dsn, $user, $pass, 'wrong type'))) printf("[001] Expecting NULL got %s/%s\n", gettype($db), $db); - } catch (TypeException $e) { + } catch (TypeError $e) { } if (!is_object($db = new PDO($dsn, $user, $pass, array()))) diff --git a/ext/pdo_mysql/tests/pdo_mysql_attr_statement_class.phpt b/ext/pdo_mysql/tests/pdo_mysql_attr_statement_class.phpt index aee3e901a0186..03a3e63d429ea 100644 --- a/ext/pdo_mysql/tests/pdo_mysql_attr_statement_class.phpt +++ b/ext/pdo_mysql/tests/pdo_mysql_attr_statement_class.phpt @@ -152,7 +152,7 @@ array(1) { } } -Fatal error: Uncaught exception 'EngineException' with message 'Cannot instantiate abstract class mystatement6' in %s:%d +Fatal error: Uncaught exception 'Error' with message 'Cannot instantiate abstract class mystatement6' in %s:%d Stack trace: #0 %s(%d): PDO->query('SELECT id, labe...') #1 {main} diff --git a/ext/pdo_mysql/tests/pdo_mysql_prepare_native_clear_error.phpt b/ext/pdo_mysql/tests/pdo_mysql_prepare_native_clear_error.phpt index 05f7de80e91ae..a95a13ad147ab 100644 --- a/ext/pdo_mysql/tests/pdo_mysql_prepare_native_clear_error.phpt +++ b/ext/pdo_mysql/tests/pdo_mysql_prepare_native_clear_error.phpt @@ -93,7 +93,7 @@ array(1) { Warning: PDO::prepare(): SQLSTATE[42S22]: Column not found: 1054 Unknown column 'unknown_column' in 'field list' in %s on line %d -Fatal error: Uncaught exception 'EngineException' with message 'Call to a member function execute() on boolean' in %s:%d +Fatal error: Uncaught exception 'Error' with message 'Call to a member function execute() on boolean' in %s:%d Stack trace: #0 {main} thrown in %s on line %d diff --git a/ext/pdo_mysql/tests/pdo_mysql_prepare_native_mixed_style.phpt b/ext/pdo_mysql/tests/pdo_mysql_prepare_native_mixed_style.phpt index d0201a1a76d39..5f1a6c101099d 100644 --- a/ext/pdo_mysql/tests/pdo_mysql_prepare_native_mixed_style.phpt +++ b/ext/pdo_mysql/tests/pdo_mysql_prepare_native_mixed_style.phpt @@ -36,7 +36,7 @@ Warning: PDO::prepare(): SQLSTATE[HY093]: Invalid parameter number: mixed named Warning: PDO::prepare(): SQLSTATE[HY093]: Invalid parameter number in %s on line %d -Fatal error: Uncaught exception 'EngineException' with message 'Call to a member function execute() on boolean' in %s:%d +Fatal error: Uncaught exception 'Error' with message 'Call to a member function execute() on boolean' in %s:%d Stack trace: #0 {main} thrown in %s on line %d diff --git a/ext/pdo_mysql/tests/pdo_mysql_stmt_errorcode.phpt b/ext/pdo_mysql/tests/pdo_mysql_stmt_errorcode.phpt index 61a9702d528e0..0f774d97d114e 100644 --- a/ext/pdo_mysql/tests/pdo_mysql_stmt_errorcode.phpt +++ b/ext/pdo_mysql/tests/pdo_mysql_stmt_errorcode.phpt @@ -56,7 +56,7 @@ Testing native PS... Warning: PDO::prepare(): SQLSTATE[42S02]: Base table or view not found: 1146 Table '%s.ihopeitdoesnotexist' doesn't exist in %s on line %d -Fatal error: Uncaught exception 'EngineException' with message 'Call to a member function execute() on boolean' in %s:%d +Fatal error: Uncaught exception 'Error' with message 'Call to a member function execute() on boolean' in %s:%d Stack trace: #0 {main} thrown in %s on line %d diff --git a/ext/pdo_mysql/tests/pdo_mysql_stmt_multiquery.phpt b/ext/pdo_mysql/tests/pdo_mysql_stmt_multiquery.phpt index 0c2e75d2be2ca..4bb83fddab4c2 100644 --- a/ext/pdo_mysql/tests/pdo_mysql_stmt_multiquery.phpt +++ b/ext/pdo_mysql/tests/pdo_mysql_stmt_multiquery.phpt @@ -99,7 +99,7 @@ Native Prepared Statements... Warning: PDO::query(): SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your %s server version for the right syntax to use near '%SSELECT label FROM test ORDER BY id ASC LIMIT 1' at line %d in %s on line %d -Fatal error: Uncaught exception 'EngineException' with message 'Call to a member function errorInfo() on boolean' in %s:%d +Fatal error: Uncaught exception 'Error' with message 'Call to a member function errorInfo() on boolean' in %s:%d Stack trace: #0 %s(%d): mysql_stmt_multiquery_wrong_usage(Object(PDO)) #1 {main} diff --git a/ext/phar/tests/badparameters.phpt b/ext/phar/tests/badparameters.phpt index 97faab427cb74..a1a9fb78a0f08 100644 --- a/ext/phar/tests/badparameters.phpt +++ b/ext/phar/tests/badparameters.phpt @@ -18,7 +18,7 @@ Phar::loadPhar(array()); Phar::canCompress('hi'); try { $a = new Phar(array()); -} catch (TypeException $e) { +} catch (TypeError $e) { print_exception($e); } try { diff --git a/ext/phar/tests/bug60261.phpt b/ext/phar/tests/bug60261.phpt index 2dd03b95174f7..84d4203e10b99 100644 --- a/ext/phar/tests/bug60261.phpt +++ b/ext/phar/tests/bug60261.phpt @@ -8,7 +8,7 @@ Bug #60261 (phar dos null pointer) try { $nx = new Phar(); $nx->getLinkTarget(); -} catch (TypeException $e) { +} catch (TypeError $e) { echo $e->getMessage(), "\n"; } diff --git a/ext/phar/tests/cache_list/frontcontroller29.phpt b/ext/phar/tests/cache_list/frontcontroller29.phpt index 4cfcd6489f599..bd2b33c913307 100644 --- a/ext/phar/tests/cache_list/frontcontroller29.phpt +++ b/ext/phar/tests/cache_list/frontcontroller29.phpt @@ -14,7 +14,7 @@ files/frontcontroller8.phar --EXPECTHEADERS-- Content-type: text/html; charset=UTF-8 --EXPECTF-- -Fatal error: Uncaught exception 'EngineException' with message 'Call to undefined function oopsie_daisy()' in phar://%sfatalerror.phps:1 +Fatal error: Uncaught exception 'Error' with message 'Call to undefined function oopsie_daisy()' in phar://%sfatalerror.phps:1 Stack trace: #0 [internal function]: unknown() #1 %s(%d): Phar::webPhar('whatever', 'index.php', '404.php', Array) diff --git a/ext/phar/tests/frontcontroller29.phpt b/ext/phar/tests/frontcontroller29.phpt index b5f572d49cd5b..5978c2c06f043 100644 --- a/ext/phar/tests/frontcontroller29.phpt +++ b/ext/phar/tests/frontcontroller29.phpt @@ -13,7 +13,7 @@ files/frontcontroller8.phar --EXPECTHEADERS-- Content-type: text/html; charset=UTF-8 --EXPECTF-- -Fatal error: Uncaught exception 'EngineException' with message 'Call to undefined function oopsie_daisy()' in phar://%sfatalerror.phps:1 +Fatal error: Uncaught exception 'Error' with message 'Call to undefined function oopsie_daisy()' in phar://%sfatalerror.phps:1 Stack trace: #0 [internal function]: unknown() #1 %s(%d): Phar::webPhar('whatever', 'index.php', '404.php', Array) diff --git a/ext/phar/tests/pharfileinfo_construct.phpt b/ext/phar/tests/pharfileinfo_construct.phpt index abd0fac2e66f6..1f4f6177b07f1 100644 --- a/ext/phar/tests/pharfileinfo_construct.phpt +++ b/ext/phar/tests/pharfileinfo_construct.phpt @@ -19,7 +19,7 @@ unlink($fname); try { $a = new PharFileInfo(array()); -} catch (TypeException $e) { +} catch (TypeError $e) { echo $e->getMessage() . "\n"; } diff --git a/ext/reflection/tests/ReflectionClass_CannotClone_basic.phpt b/ext/reflection/tests/ReflectionClass_CannotClone_basic.phpt index a2eedf7c546cb..a19a292e1e920 100644 --- a/ext/reflection/tests/ReflectionClass_CannotClone_basic.phpt +++ b/ext/reflection/tests/ReflectionClass_CannotClone_basic.phpt @@ -12,7 +12,7 @@ if (!extension_loaded('reflection)) print 'skip'; $rc = new ReflectionClass("stdClass"); $rc2 = clone($rc); --EXPECTF-- -Fatal error: Uncaught exception 'EngineException' with message 'Trying to clone an uncloneable object of class ReflectionClass' in %s:%d +Fatal error: Uncaught exception 'Error' with message 'Trying to clone an uncloneable object of class ReflectionClass' in %s:%d Stack trace: #0 {main} thrown in %s on line %d diff --git a/ext/reflection/tests/ReflectionClass_getName_error1.phpt b/ext/reflection/tests/ReflectionClass_getName_error1.phpt index 4bffdf8473f89..4a46d6970ee66 100644 --- a/ext/reflection/tests/ReflectionClass_getName_error1.phpt +++ b/ext/reflection/tests/ReflectionClass_getName_error1.phpt @@ -5,7 +5,7 @@ ReflectionClass::getName - forbid static invocation ReflectionClass::getName(); ?> --EXPECTF-- -Fatal error: Uncaught exception 'EngineException' with message 'Non-static method ReflectionClass::getName() cannot be called statically' in %s:2 +Fatal error: Uncaught exception 'Error' with message 'Non-static method ReflectionClass::getName() cannot be called statically' in %s:2 Stack trace: #0 {main} thrown in %s on line 2 diff --git a/ext/reflection/tests/ReflectionClass_isCloneable_001.phpt b/ext/reflection/tests/ReflectionClass_isCloneable_001.phpt index c47859e428956..3d0fcf90d89c3 100644 --- a/ext/reflection/tests/ReflectionClass_isCloneable_001.phpt +++ b/ext/reflection/tests/ReflectionClass_isCloneable_001.phpt @@ -68,7 +68,7 @@ Internal class - XMLWriter bool(false) bool(false) -Fatal error: Uncaught exception 'EngineException' with message 'Trying to clone an uncloneable object of class XMLWriter' in %s:%d +Fatal error: Uncaught exception 'Error' with message 'Trying to clone an uncloneable object of class XMLWriter' in %s:%d Stack trace: #0 {main} thrown in %s on line %d diff --git a/ext/reflection/tests/ReflectionClass_isIterateable_001.phpt b/ext/reflection/tests/ReflectionClass_isIterateable_001.phpt index d83f9acce0ca7..0bf37b0e46734 100644 --- a/ext/reflection/tests/ReflectionClass_isIterateable_001.phpt +++ b/ext/reflection/tests/ReflectionClass_isIterateable_001.phpt @@ -86,7 +86,7 @@ NULL Test static invocation: -Fatal error: Uncaught exception 'EngineException' with message 'Non-static method ReflectionClass::isIterateable() cannot be called statically' in %s:43 +Fatal error: Uncaught exception 'Error' with message 'Non-static method ReflectionClass::isIterateable() cannot be called statically' in %s:43 Stack trace: #0 {main} thrown in %s on line 43 \ No newline at end of file diff --git a/ext/reflection/tests/ReflectionExtension_constructor_error.phpt b/ext/reflection/tests/ReflectionExtension_constructor_error.phpt index 235c2ad768ff3..94071de5ab17e 100644 --- a/ext/reflection/tests/ReflectionExtension_constructor_error.phpt +++ b/ext/reflection/tests/ReflectionExtension_constructor_error.phpt @@ -7,19 +7,19 @@ Leon Luijkx getMessage().PHP_EOL; } try { $obj = new ReflectionExtension('foo', 'bar'); -} catch (TypeException $re) { +} catch (TypeError $re) { echo "Ok - ".$re->getMessage().PHP_EOL; } try { $obj = new ReflectionExtension([]); -} catch (TypeException $re) { +} catch (TypeError $re) { echo "Ok - ".$re->getMessage().PHP_EOL; } diff --git a/ext/reflection/tests/ReflectionFunction_construct.001.phpt b/ext/reflection/tests/ReflectionFunction_construct.001.phpt index 52db7c654d59c..0e2e8a3681f5b 100644 --- a/ext/reflection/tests/ReflectionFunction_construct.001.phpt +++ b/ext/reflection/tests/ReflectionFunction_construct.001.phpt @@ -9,7 +9,7 @@ Steve Seear try { $a = new ReflectionFunction(array(1, 2, 3)); echo "exception not thrown.".PHP_EOL; -} catch (TypeException $re) { +} catch (TypeError $re) { echo "Ok - ".$re->getMessage().PHP_EOL; } try { @@ -19,17 +19,17 @@ try { } try { $a = new ReflectionFunction(); -} catch (TypeException $re) { +} catch (TypeError $re) { echo "Ok - ".$re->getMessage().PHP_EOL; } try { $a = new ReflectionFunction(1, 2); -} catch (TypeException $re) { +} catch (TypeError $re) { echo "Ok - ".$re->getMessage().PHP_EOL; } try { $a = new ReflectionFunction([]); -} catch (TypeException $re) { +} catch (TypeError $re) { echo "Ok - ".$re->getMessage().PHP_EOL; } diff --git a/ext/reflection/tests/ReflectionMethod_006.phpt b/ext/reflection/tests/ReflectionMethod_006.phpt index b22a2acc6d724..627dc96f32ee6 100644 --- a/ext/reflection/tests/ReflectionMethod_006.phpt +++ b/ext/reflection/tests/ReflectionMethod_006.phpt @@ -8,12 +8,12 @@ Steve Seear try { new ReflectionMethod(); -} catch (TypeException $re) { +} catch (TypeError $re) { echo "Ok - ".$re->getMessage().PHP_EOL; } try { new ReflectionMethod('a', 'b', 'c'); -} catch (TypeException $re) { +} catch (TypeError $re) { echo "Ok - ".$re->getMessage().PHP_EOL; } diff --git a/ext/reflection/tests/ReflectionMethod_constructor_error2.phpt b/ext/reflection/tests/ReflectionMethod_constructor_error2.phpt index 3c521efc64b8e..98125cba652f7 100644 --- a/ext/reflection/tests/ReflectionMethod_constructor_error2.phpt +++ b/ext/reflection/tests/ReflectionMethod_constructor_error2.phpt @@ -16,13 +16,13 @@ class TestClass try { echo "Too few arguments:\n"; $methodInfo = new ReflectionMethod(); -} catch (TypeException $re) { +} catch (TypeError $re) { echo "Ok - ".$re->getMessage().PHP_EOL; } try { echo "\nToo many arguments:\n"; $methodInfo = new ReflectionMethod("TestClass", "foo", true); -} catch (TypeException $re) { +} catch (TypeError $re) { echo "Ok - ".$re->getMessage().PHP_EOL; } @@ -45,7 +45,7 @@ try { try{ //invalid 2nd param $methodInfo = new ReflectionMethod("TestClass", []); -} catch (TypeException $re) { +} catch (TypeError $re) { echo "Ok - ".$re->getMessage().PHP_EOL; } diff --git a/ext/reflection/tests/ReflectionMethod_invokeArgs_error2.phpt b/ext/reflection/tests/ReflectionMethod_invokeArgs_error2.phpt index 0405df67e152e..8bedbea0cb157 100644 --- a/ext/reflection/tests/ReflectionMethod_invokeArgs_error2.phpt +++ b/ext/reflection/tests/ReflectionMethod_invokeArgs_error2.phpt @@ -18,7 +18,7 @@ $testClassInstance = new TestClass(); try { var_dump($foo->invokeArgs($testClassInstance, true)); -} catch (EngineException $e) { +} catch (Error $e) { var_dump($e->getMessage()); } diff --git a/ext/reflection/tests/ReflectionObject_getName_error1.phpt b/ext/reflection/tests/ReflectionObject_getName_error1.phpt index c846e274229af..a8b30ba5d79fa 100644 --- a/ext/reflection/tests/ReflectionObject_getName_error1.phpt +++ b/ext/reflection/tests/ReflectionObject_getName_error1.phpt @@ -5,7 +5,7 @@ ReflectionObject::getName - forbid static invocation ReflectionObject::getName(); ?> --EXPECTF-- -Fatal error: Uncaught exception 'EngineException' with message 'Non-static method ReflectionClass::getName() cannot be called statically' in %s:2 +Fatal error: Uncaught exception 'Error' with message 'Non-static method ReflectionClass::getName() cannot be called statically' in %s:2 Stack trace: #0 {main} thrown in %s on line 2 diff --git a/ext/reflection/tests/ReflectionParameter_invalidMethodInConstructor.phpt b/ext/reflection/tests/ReflectionParameter_invalidMethodInConstructor.phpt index a884162fd2a74..6c154558e913e 100644 --- a/ext/reflection/tests/ReflectionParameter_invalidMethodInConstructor.phpt +++ b/ext/reflection/tests/ReflectionParameter_invalidMethodInConstructor.phpt @@ -25,7 +25,7 @@ class C { try { new ReflectionParameter(array ('A', 'b')); } -catch(TypeException $e) { +catch(TypeError $e) { printf( "Ok - %s\n", $e->getMessage()); } diff --git a/ext/reflection/tests/ReflectionProperty_error.phpt b/ext/reflection/tests/ReflectionProperty_error.phpt index ef051b53804a8..c8a2f11ee1d3c 100644 --- a/ext/reflection/tests/ReflectionProperty_error.phpt +++ b/ext/reflection/tests/ReflectionProperty_error.phpt @@ -9,18 +9,18 @@ class C { try { new ReflectionProperty(); -} catch (TypeException $re) { +} catch (TypeError $re) { echo "Ok - ".$re->getMessage().PHP_EOL; } try { new ReflectionProperty('C::p'); -} catch (TypeException $re) { +} catch (TypeError $re) { echo "Ok - ".$re->getMessage().PHP_EOL; } try { new ReflectionProperty('C', 'p', 'x'); -} catch (TypeException $re) { +} catch (TypeError $re) { echo "Ok - ".$re->getMessage().PHP_EOL; } diff --git a/ext/reflection/tests/bug64007.phpt b/ext/reflection/tests/bug64007.phpt index 8ee07bf5556b7..cf8ec1dfcc7de 100644 --- a/ext/reflection/tests/bug64007.phpt +++ b/ext/reflection/tests/bug64007.phpt @@ -16,7 +16,7 @@ var_dump($generator); --EXPECTF-- string(%d) "Class Generator is an internal class marked as final that cannot be instantiated without invoking its constructor" -Fatal error: Uncaught exception 'EngineException' with message 'The "Generator" class is reserved for internal use and cannot be manually instantiated' in %sbug64007.php:%d +Fatal error: Uncaught exception 'Error' with message 'The "Generator" class is reserved for internal use and cannot be manually instantiated' in %sbug64007.php:%d Stack trace: #0 %s(%d): ReflectionClass->newInstance() #1 {main} diff --git a/ext/session/tests/bug60634_error_1.phpt b/ext/session/tests/bug60634_error_1.phpt index 80d7c13bb01b4..ec7f190b41ff3 100644 --- a/ext/session/tests/bug60634_error_1.phpt +++ b/ext/session/tests/bug60634_error_1.phpt @@ -45,7 +45,7 @@ echo "um, hi\n"; --EXPECTF-- write: goodbye cruel world -Fatal error: Uncaught exception 'EngineException' with message 'Call to undefined function undefined_function()' in %s:%d +Fatal error: Uncaught exception 'Error' with message 'Call to undefined function undefined_function()' in %s:%d Stack trace: #0 [internal function]: write(%s, '') #1 %s(%d): session_write_close() diff --git a/ext/session/tests/bug60634_error_3.phpt b/ext/session/tests/bug60634_error_3.phpt index a93098274370a..9a32de7a1918a 100644 --- a/ext/session/tests/bug60634_error_3.phpt +++ b/ext/session/tests/bug60634_error_3.phpt @@ -43,7 +43,7 @@ session_start(); --EXPECTF-- write: goodbye cruel world -Fatal error: Uncaught exception 'EngineException' with message 'Call to undefined function undefined_function()' in %s:%d +Fatal error: Uncaught exception 'Error' with message 'Call to undefined function undefined_function()' in %s:%d Stack trace: #0 [internal function]: write(%s, '') #1 {main} diff --git a/ext/session/tests/bug60634_error_5.phpt b/ext/session/tests/bug60634_error_5.phpt index da8de1117e0c0..995917d0b4981 100644 --- a/ext/session/tests/bug60634_error_5.phpt +++ b/ext/session/tests/bug60634_error_5.phpt @@ -44,7 +44,7 @@ echo "um, hi\n"; --EXPECTF-- close: goodbye cruel world -Fatal error: Uncaught exception 'EngineException' with message 'Call to undefined function undefined_function()' in %s:%d +Fatal error: Uncaught exception 'Error' with message 'Call to undefined function undefined_function()' in %s:%d Stack trace: #0 [internal function]: close() #1 %s(%d): session_write_close() diff --git a/ext/simplexml/tests/SimpleXMLElement_xpath.phpt b/ext/simplexml/tests/SimpleXMLElement_xpath.phpt index 77402270d293e..d32be192087c9 100644 --- a/ext/simplexml/tests/SimpleXMLElement_xpath.phpt +++ b/ext/simplexml/tests/SimpleXMLElement_xpath.phpt @@ -11,7 +11,7 @@ Notice: Undefined variable: x in %s on line %d Warning: simplexml_load_string() expects parameter 3 to be integer, float given in %s on line %d -Fatal error: Uncaught exception 'EngineException' with message 'Call to a member function xpath() on null' in %s:%d +Fatal error: Uncaught exception 'Error' with message 'Call to a member function xpath() on null' in %s:%d Stack trace: #0 {main} thrown in %s on line %d diff --git a/ext/simplexml/tests/bug37565.phpt b/ext/simplexml/tests/bug37565.phpt index cf5a3d8849d2a..7d9675e3fd41c 100644 --- a/ext/simplexml/tests/bug37565.phpt +++ b/ext/simplexml/tests/bug37565.phpt @@ -17,13 +17,13 @@ class Setting extends ReflectionObject try { Reflection::export(simplexml_load_string('', 'Setting')); -} catch (EngineException $e) { +} catch (Error $e) { my_error_handler($e->getCode(), $e->getMessage(), $e->getFile(), $e->getLine()); } try { Reflection::export(simplexml_load_file('data:,', 'Setting')); -} catch (EngineException $e) { +} catch (Error $e) { my_error_handler($e->getCode(), $e->getMessage(), $e->getFile(), $e->getLine()); } diff --git a/ext/snmp/tests/snmp-object-error.phpt b/ext/snmp/tests/snmp-object-error.phpt index e2574872f4dd5..2b81629d7e954 100644 --- a/ext/snmp/tests/snmp-object-error.phpt +++ b/ext/snmp/tests/snmp-object-error.phpt @@ -16,17 +16,17 @@ snmp_set_valueretrieval(SNMP_VALUE_PLAIN); try { var_dump(new SNMP(SNMP::VERSION_1, $hostname)); -} catch (TypeException $e) { +} catch (TypeError $e) { print $e->getMessage() . "\n"; } try { var_dump(new SNMP(SNMP::VERSION_1, $hostname, $community, '')); -} catch (TypeException $e) { +} catch (TypeError $e) { print $e->getMessage() . "\n"; } try { var_dump(new SNMP(SNMP::VERSION_1, $hostname, $community, $timeout, '')); -} catch (TypeException $e) { +} catch (TypeError $e) { print $e->getMessage() . "\n"; } try { diff --git a/ext/spl/tests/CallbackFilterIteratorTest-002.phpt b/ext/spl/tests/CallbackFilterIteratorTest-002.phpt index 1f71d3032a48d..216a40bd6a8ef 100644 --- a/ext/spl/tests/CallbackFilterIteratorTest-002.phpt +++ b/ext/spl/tests/CallbackFilterIteratorTest-002.phpt @@ -10,25 +10,25 @@ set_error_handler(function($errno, $errstr){ try { new CallbackFilterIterator(); -} catch (TypeException $e) { +} catch (TypeError $e) { echo $e->getMessage() . "\n"; } try { new CallbackFilterIterator(null); -} catch (TypeException $e) { +} catch (TypeError $e) { echo $e->getMessage() . "\n"; } try { new CallbackFilterIterator(new ArrayIterator(array()), null); -} catch (TypeException $e) { +} catch (TypeError $e) { echo $e->getMessage() . "\n"; } try { new CallbackFilterIterator(new ArrayIterator(array()), array()); -} catch (TypeException $e) { +} catch (TypeError $e) { echo $e->getMessage() . "\n"; } diff --git a/ext/spl/tests/SplFixedArray__construct_param_array.phpt b/ext/spl/tests/SplFixedArray__construct_param_array.phpt index e1515c4039a7d..b15579edcab2b 100644 --- a/ext/spl/tests/SplFixedArray__construct_param_array.phpt +++ b/ext/spl/tests/SplFixedArray__construct_param_array.phpt @@ -7,7 +7,7 @@ PHPNW Test Fest 2009 - Jordan Hatch try { $array = new SplFixedArray( array("string", 1) ); -} catch (TypeException $iae) { +} catch (TypeError $iae) { echo "Ok - ".$iae->getMessage().PHP_EOL; } diff --git a/ext/spl/tests/SplFixedArray__construct_param_string.phpt b/ext/spl/tests/SplFixedArray__construct_param_string.phpt index 66c7fe6a592b3..d30fc691c6eb6 100644 --- a/ext/spl/tests/SplFixedArray__construct_param_string.phpt +++ b/ext/spl/tests/SplFixedArray__construct_param_string.phpt @@ -6,7 +6,7 @@ PHPNW Test Fest 2009 - Jordan Hatch getMessage().PHP_EOL; } diff --git a/ext/spl/tests/SplFixedArray_construct_param_SplFixedArray.phpt b/ext/spl/tests/SplFixedArray_construct_param_SplFixedArray.phpt index 20f4e7970c903..4739d8c55d439 100644 --- a/ext/spl/tests/SplFixedArray_construct_param_SplFixedArray.phpt +++ b/ext/spl/tests/SplFixedArray_construct_param_SplFixedArray.phpt @@ -6,7 +6,7 @@ Philip Norton philipnorton42@gmail.com getMessage().PHP_EOL; } diff --git a/ext/spl/tests/SplTempFileObject_constructor_error.phpt b/ext/spl/tests/SplTempFileObject_constructor_error.phpt index 8eb306689d127..fe473669879de 100644 --- a/ext/spl/tests/SplTempFileObject_constructor_error.phpt +++ b/ext/spl/tests/SplTempFileObject_constructor_error.phpt @@ -4,7 +4,7 @@ SPL SplTempFileObject constructor sets correct defaults when pass 0 arguments getMessage(), "\n"; } ?> diff --git a/ext/spl/tests/arrayObject___construct_error1.phpt b/ext/spl/tests/arrayObject___construct_error1.phpt index cff0dd048d962..f0e1107d51375 100644 --- a/ext/spl/tests/arrayObject___construct_error1.phpt +++ b/ext/spl/tests/arrayObject___construct_error1.phpt @@ -7,14 +7,14 @@ $a = new stdClass; $a->p = 1; try { var_dump(new ArrayObject($a, 0, "Exception")); -} catch (TypeException $e) { +} catch (TypeError $e) { echo $e->getMessage() . "(" . $e->getLine() . ")\n"; } echo "Non-existent class:\n"; try { var_dump(new ArrayObject(new stdClass, 0, "nonExistentClassName")); -} catch (TypeException $e) { +} catch (TypeError $e) { echo $e->getMessage() . "(" . $e->getLine() . ")\n"; } ?> diff --git a/ext/spl/tests/arrayObject___construct_error2.phpt b/ext/spl/tests/arrayObject___construct_error2.phpt index d075516725222..35ba83d09f3b0 100644 --- a/ext/spl/tests/arrayObject___construct_error2.phpt +++ b/ext/spl/tests/arrayObject___construct_error2.phpt @@ -13,7 +13,7 @@ Class C implements Iterator { try { var_dump(new ArrayObject(new stdClass, 0, "C", "extra")); -} catch (TypeException $e) { +} catch (TypeError $e) { echo $e->getMessage() . "(" . $e->getLine() . ")\n"; } ?> diff --git a/ext/spl/tests/arrayObject_setFlags_basic2.phpt b/ext/spl/tests/arrayObject_setFlags_basic2.phpt index 534c75599572a..89dfc7448d8e3 100644 --- a/ext/spl/tests/arrayObject_setFlags_basic2.phpt +++ b/ext/spl/tests/arrayObject_setFlags_basic2.phpt @@ -26,7 +26,7 @@ string(6) "secret" string(6) "public" string(6) "secret" -Fatal error: Uncaught exception 'EngineException' with message 'Cannot access private property C::$x' in %s:19 +Fatal error: Uncaught exception 'Error' with message 'Cannot access private property C::$x' in %s:19 Stack trace: #0 {main} thrown in %s on line 19 diff --git a/ext/spl/tests/arrayObject_setIteratorClass_error1.phpt b/ext/spl/tests/arrayObject_setIteratorClass_error1.phpt index b4c3756cb50c9..89efdb6a9f6a2 100644 --- a/ext/spl/tests/arrayObject_setIteratorClass_error1.phpt +++ b/ext/spl/tests/arrayObject_setIteratorClass_error1.phpt @@ -28,7 +28,7 @@ try { foreach($ao as $key=>$value) { echo " $key=>$value\n"; } -} catch (TypeException $e) { +} catch (TypeError $e) { var_dump($e->getMessage()); } @@ -37,7 +37,7 @@ try { foreach($ao as $key=>$value) { echo " $key=>$value\n"; } -} catch (TypeException $e) { +} catch (TypeError $e) { var_dump($e->getMessage()); } diff --git a/ext/spl/tests/bug48023.phpt b/ext/spl/tests/bug48023.phpt index 59bbb81f8bb5c..3bb29ca7e52a9 100644 --- a/ext/spl/tests/bug48023.phpt +++ b/ext/spl/tests/bug48023.phpt @@ -9,7 +9,7 @@ new Foo; ?> ===DONE=== --EXPECTF-- -Fatal error: Uncaught exception 'EngineException' with message 'Class 'Foo' not found' in %s:%d +Fatal error: Uncaught exception 'Error' with message 'Class 'Foo' not found' in %s:%d Stack trace: #0 {main} thrown in %s on line %d diff --git a/ext/spl/tests/bug49972.phpt b/ext/spl/tests/bug49972.phpt index dff469f6250f8..9c7807d9e1d8e 100644 --- a/ext/spl/tests/bug49972.phpt +++ b/ext/spl/tests/bug49972.phpt @@ -8,7 +8,7 @@ $iterator->undefined(); ?> --EXPECTF-- -Fatal error: Uncaught exception 'EngineException' with message 'Call to undefined method AppendIterator::undefined()' in %s:%d +Fatal error: Uncaught exception 'Error' with message 'Call to undefined method AppendIterator::undefined()' in %s:%d Stack trace: #0 {main} thrown in %s on line %d diff --git a/ext/spl/tests/bug54292.phpt b/ext/spl/tests/bug54292.phpt index 44d12ee242fb6..288f49a4ecfc4 100644 --- a/ext/spl/tests/bug54292.phpt +++ b/ext/spl/tests/bug54292.phpt @@ -5,7 +5,7 @@ Bug #54292 (Wrong parameter causes crash in SplFileObject::__construct()) try { new SplFileObject('foo', array()); -} catch (TypeException $e) { +} catch (TypeError $e) { var_dump($e->getMessage()); } diff --git a/ext/spl/tests/fixedarray_005.phpt b/ext/spl/tests/fixedarray_005.phpt index 83727a23b93ec..cc64fd01b0173 100644 --- a/ext/spl/tests/fixedarray_005.phpt +++ b/ext/spl/tests/fixedarray_005.phpt @@ -5,19 +5,19 @@ SPL: FixedArray: Invalid arguments try { $a = new SplFixedArray(new stdClass); -} catch (TypeException $iae) { +} catch (TypeError $iae) { echo "Ok - ".$iae->getMessage().PHP_EOL; } try { $a = new SplFixedArray('FOO'); -} catch (TypeException $iae) { +} catch (TypeError $iae) { echo "Ok - ".$iae->getMessage().PHP_EOL; } try { $a = new SplFixedArray(''); -} catch (TypeException $iae) { +} catch (TypeError $iae) { echo "Ok - ".$iae->getMessage().PHP_EOL; } diff --git a/ext/spl/tests/fixedarray_009.phpt b/ext/spl/tests/fixedarray_009.phpt index f255ed299a763..fe38883621188 100644 --- a/ext/spl/tests/fixedarray_009.phpt +++ b/ext/spl/tests/fixedarray_009.phpt @@ -5,7 +5,7 @@ SPL: FixedArray: Trying to instantiate passing string to construtor parameter try { $a = new SplFixedArray('FOO'); -} catch (TypeException $iae) { +} catch (TypeError $iae) { echo "Ok - ".$iae->getMessage().PHP_EOL; } ?> diff --git a/ext/spl/tests/fixedarray_015.phpt b/ext/spl/tests/fixedarray_015.phpt index d189d41da3e4e..b6f119ab1f742 100644 --- a/ext/spl/tests/fixedarray_015.phpt +++ b/ext/spl/tests/fixedarray_015.phpt @@ -5,7 +5,7 @@ SPL: FixedArray: accessing uninitialized array try { $a = new SplFixedArray(''); -} catch (TypeException $iae) { +} catch (TypeError $iae) { echo "Ok - ".$iae->getMessage().PHP_EOL; } diff --git a/ext/spl/tests/iterator_035.phpt b/ext/spl/tests/iterator_035.phpt index d166cfdba730d..8d5777f6ae92d 100644 --- a/ext/spl/tests/iterator_035.phpt +++ b/ext/spl/tests/iterator_035.phpt @@ -14,7 +14,7 @@ echo "Done\n"; --EXPECTF-- Notice: Indirect modification of overloaded element of ArrayIterator has no effect in %s on line %d -Fatal error: Uncaught exception 'EngineException' with message 'Cannot assign by reference to overloaded object' in %s:%d +Fatal error: Uncaught exception 'Error' with message 'Cannot assign by reference to overloaded object' in %s:%d Stack trace: #0 {main} thrown in %s on line %d diff --git a/ext/spl/tests/iterator_042.phpt b/ext/spl/tests/iterator_042.phpt index d654ede97aba3..a344d60e330c0 100644 --- a/ext/spl/tests/iterator_042.phpt +++ b/ext/spl/tests/iterator_042.phpt @@ -15,7 +15,7 @@ $it = new AppendIterator; try { $it->append(array()); -} catch (EngineException $e) { +} catch (Error $e) { test_error_handler($e->getCode(), $e->getMessage(), $e->getFile(), $e->getLine()); } $it->append(new ArrayIterator(array(1))); diff --git a/ext/spl/tests/iterator_056.phpt b/ext/spl/tests/iterator_056.phpt index ee982636383b2..b5213732c3a1b 100644 --- a/ext/spl/tests/iterator_056.phpt +++ b/ext/spl/tests/iterator_056.phpt @@ -21,36 +21,36 @@ class myNoRewindIterator extends NoRewindIterator {} try { $it = new myFilterIterator(); -} catch (TypeException $e) { +} catch (TypeError $e) { echo $e->getMessage(), "\n"; } try { $it = new myCachingIterator(); -} catch (TypeException $e) { +} catch (TypeError $e) { echo $e->getMessage(), "\n"; } try { $it = new myRecursiveCachingIterator(); -} catch (TypeException $e) { +} catch (TypeError $e) { echo $e->getMessage(), "\n"; } try { $it = new myParentIterator(); -} catch (TypeException $e) { +} catch (TypeError $e) { echo $e->getMessage(), "\n"; } try { $it = new myLimitIterator(); -} catch (TypeException $e) { +} catch (TypeError $e) { echo $e->getMessage(), "\n"; } try { $it = new myNoRewindIterator(); -} catch (TypeException $e) { +} catch (TypeError $e) { echo $e->getMessage(), "\n"; } diff --git a/ext/spl/tests/recursive_tree_iterator_003.phpt b/ext/spl/tests/recursive_tree_iterator_003.phpt index 4cc7000a19f0f..721b67ac02f94 100644 --- a/ext/spl/tests/recursive_tree_iterator_003.phpt +++ b/ext/spl/tests/recursive_tree_iterator_003.phpt @@ -4,7 +4,7 @@ SPL: RecursiveTreeIterator(non-traversable) getMessage(), "\n"; } ?> diff --git a/ext/spl/tests/spl_004.phpt b/ext/spl/tests/spl_004.phpt index c321bab29611b..ac44b9d684600 100644 --- a/ext/spl/tests/spl_004.phpt +++ b/ext/spl/tests/spl_004.phpt @@ -44,7 +44,7 @@ var_dump(iterator_apply($it, 'test')); echo "===ERRORS===\n"; try { var_dump(iterator_apply($it, 'test', 1)); -} catch (EngineException $e) { +} catch (Error $e) { my_error_handler($e->getCode(), $e->getMessage(), $e->getFile(), $e->getLine()); } var_dump(iterator_apply($it, 'non_existing_function')); diff --git a/ext/spl/tests/spl_iterator_iterator_constructor.phpt b/ext/spl/tests/spl_iterator_iterator_constructor.phpt index ec103f5c9cbf9..4c3fae25a2925 100644 --- a/ext/spl/tests/spl_iterator_iterator_constructor.phpt +++ b/ext/spl/tests/spl_iterator_iterator_constructor.phpt @@ -15,7 +15,7 @@ try { $test = new IteratorIterator($arrayIterator, 1, 1); $test = new IteratorIterator($arrayIterator, 1, 1, 1); $test = new IteratorIterator($arrayIterator, 1, 1, 1, 1); -} catch (TypeException $e){ +} catch (TypeError $e){ echo $e->getMessage() . "\n"; } diff --git a/ext/spl/tests/spl_iterator_recursive_getiterator_error.phpt b/ext/spl/tests/spl_iterator_recursive_getiterator_error.phpt index 9fee08b9f4e93..9e57cd8a11c9c 100644 --- a/ext/spl/tests/spl_iterator_recursive_getiterator_error.phpt +++ b/ext/spl/tests/spl_iterator_recursive_getiterator_error.phpt @@ -13,7 +13,7 @@ function p ($i) { } ?> --EXPECTF-- -Fatal error: Uncaught exception 'EngineException' with message 'An iterator cannot be used with foreach by reference' in %s:%d +Fatal error: Uncaught exception 'Error' with message 'An iterator cannot be used with foreach by reference' in %s:%d Stack trace: #0 %s(%d): p(Object(IteratorIterator)) #1 {main} diff --git a/ext/sqlite3/tests/sqlite3_02_open.phpt b/ext/sqlite3/tests/sqlite3_02_open.phpt index 985033b33ec58..b9b49530b3f86 100644 --- a/ext/sqlite3/tests/sqlite3_02_open.phpt +++ b/ext/sqlite3/tests/sqlite3_02_open.phpt @@ -10,7 +10,7 @@ Felix De Vliegher try { $db = new SQLite3(); -} catch (TypeException $e) { +} catch (TypeError $e) { var_dump($e->getMessage()); } diff --git a/ext/standard/tests/array/arsort_object1.phpt b/ext/standard/tests/array/arsort_object1.phpt index e7c5bf8035caa..3b72c64746df0 100644 --- a/ext/standard/tests/array/arsort_object1.phpt +++ b/ext/standard/tests/array/arsort_object1.phpt @@ -87,7 +87,7 @@ echo "Done\n"; --EXPECTF-- *** Testing arsort() : object functionality *** -Fatal error: Uncaught exception 'EngineException' with message 'Class 'for_integer_asort' not found' in %sarsort_object1.php:%d +Fatal error: Uncaught exception 'Error' with message 'Class 'for_integer_asort' not found' in %sarsort_object1.php:%d Stack trace: #0 {main} thrown in %sarsort_object1.php on line %d \ No newline at end of file diff --git a/ext/standard/tests/array/arsort_object2.phpt b/ext/standard/tests/array/arsort_object2.phpt index b21982e6f3bbb..c906a3605375c 100644 --- a/ext/standard/tests/array/arsort_object2.phpt +++ b/ext/standard/tests/array/arsort_object2.phpt @@ -91,7 +91,7 @@ echo "Done\n"; --EXPECTF-- *** Testing arsort() : object functionality *** -Fatal error: Uncaught exception 'EngineException' with message 'Class 'for_integer_asort' not found' in %sarsort_object2.php:%d +Fatal error: Uncaught exception 'Error' with message 'Class 'for_integer_asort' not found' in %sarsort_object2.php:%d Stack trace: #0 {main} thrown in %sarsort_object2.php on line %d \ No newline at end of file diff --git a/ext/standard/tests/general_functions/010.phpt b/ext/standard/tests/general_functions/010.phpt index a4802b0808bb0..51132c6a15069 100644 --- a/ext/standard/tests/general_functions/010.phpt +++ b/ext/standard/tests/general_functions/010.phpt @@ -13,7 +13,7 @@ class test { try { var_dump(register_shutdown_function(array("test","__call"))); -} catch (EngineException $e) { +} catch (Error $e) { echo "\nException: " . $e->getMessage() . "\n"; } diff --git a/ext/standard/tests/general_functions/bug47857.phpt b/ext/standard/tests/general_functions/bug47857.phpt index 98c1981841910..54de8ba313878 100644 --- a/ext/standard/tests/general_functions/bug47857.phpt +++ b/ext/standard/tests/general_functions/bug47857.phpt @@ -19,7 +19,7 @@ Deprecated: Non-static method foo::bar() should not be called statically in %sbu ok bool(false) -Fatal error: Uncaught exception 'EngineException' with message 'Non-static method BaseException::getMessage() cannot be called statically' in %sbug47857.php:%d +Fatal error: Uncaught exception 'Error' with message 'Non-static method Exception::getMessage() cannot be called statically' in %sbug47857.php:%d Stack trace: #0 {main} thrown in %sbug47857.php on line %d diff --git a/ext/standard/tests/serialize/bug69152.phpt b/ext/standard/tests/serialize/bug69152.phpt index eb3f34e21ea82..a91811a8a1584 100644 --- a/ext/standard/tests/serialize/bug69152.phpt +++ b/ext/standard/tests/serialize/bug69152.phpt @@ -2,15 +2,10 @@ Bug #69152: Type Confusion Infoleak Vulnerability in unserialize() --FILE-- test(); ?> --EXPECTF-- -exception 'Exception' in %s:%d -Stack trace: -#0 {main} Fatal error: main(): The script tried to execute a method or access a property of an incomplete object. Please ensure that the class definition "unknown" of the object you are trying to operate on was loaded _before_ unserialize() gets called or provide a __autoload() function to load the class definition in %s on line %d diff --git a/ext/tidy/tests/035.phpt b/ext/tidy/tests/035.phpt index a7183e1921f76..d63e4a085c35d 100644 --- a/ext/tidy/tests/035.phpt +++ b/ext/tidy/tests/035.phpt @@ -9,7 +9,7 @@ tidyNode::__construct() new tidyNode; ?> --EXPECTF-- -Fatal error: Uncaught exception 'EngineException' with message 'Call to private tidyNode::__construct() from invalid context' in %s:%d +Fatal error: Uncaught exception 'Error' with message 'Call to private tidyNode::__construct() from invalid context' in %s:%d Stack trace: #0 {main} thrown in %s on line %d diff --git a/ext/tokenizer/tests/parse_errors.phpt b/ext/tokenizer/tests/parse_errors.phpt index 3ee2cb081b7cd..bfa6e07ac4b34 100644 --- a/ext/tokenizer/tests/parse_errors.phpt +++ b/ext/tokenizer/tests/parse_errors.phpt @@ -8,7 +8,7 @@ Parse errors during token_get_all() function test_parse_error($code) { try { var_dump(token_get_all($code)); - } catch (ParseException $e) { + } catch (ParseError $e) { echo $e->getMessage(), "\n"; } } diff --git a/ext/xmlreader/tests/bug51936.phpt b/ext/xmlreader/tests/bug51936.phpt index 619b9ec1d9e6f..d3ce8c1f6442d 100644 --- a/ext/xmlreader/tests/bug51936.phpt +++ b/ext/xmlreader/tests/bug51936.phpt @@ -19,7 +19,7 @@ Done --EXPECTF-- Test -Fatal error: Uncaught exception 'EngineException' with message 'Trying to clone an uncloneable object of class XMLReader' in %s:%d +Fatal error: Uncaught exception 'Error' with message 'Trying to clone an uncloneable object of class XMLReader' in %s:%d Stack trace: #0 {main} thrown in %s on line %d diff --git a/sapi/cgi/tests/004.phpt b/sapi/cgi/tests/004.phpt index e6314c9b6142e..854d27873b8fc 100644 --- a/sapi/cgi/tests/004.phpt +++ b/sapi/cgi/tests/004.phpt @@ -36,7 +36,7 @@ echo "Done\n"; --EXPECTF-- string(%d) "
-Fatal error: Uncaught exception 'EngineException' with message 'Cannot access private property test::$pri' in %s004.test.php:8 +Fatal error: Uncaught exception 'Error' with message 'Cannot access private property test::$pri' in %s004.test.php:8 Stack trace: #0 {main} thrown in %s004.test.php on line 8
diff --git a/sapi/cli/tests/005.phpt b/sapi/cli/tests/005.phpt index 2ec0a40df361d..b7825e673fc51 100644 --- a/sapi/cli/tests/005.phpt +++ b/sapi/cli/tests/005.phpt @@ -14,7 +14,7 @@ $php = getenv('TEST_PHP_EXECUTABLE'); var_dump(`"$php" -n --rc unknown`); var_dump(`"$php" -n --rc stdclass`); -var_dump(`"$php" -n --rc baseexception`); +var_dump(`"$php" -n --rc exception`); echo "Done\n"; ?> @@ -40,7 +40,7 @@ string(183) "Class [ class stdClass ] { } " -string(1368) "Class [ abstract class BaseException ] { +string(1368) "Class [ class Exception implements Throwable ] { - Constants [0] { } diff --git a/sapi/cli/tests/008.phpt b/sapi/cli/tests/008.phpt index 279064d3a776e..e70f57bfc9a1f 100644 --- a/sapi/cli/tests/008.phpt +++ b/sapi/cli/tests/008.phpt @@ -36,7 +36,7 @@ echo "Done\n"; --EXPECTF-- string(%d) " -Fatal error: Uncaught exception 'EngineException' with message 'Cannot access private property test::$pri' in %s:%d +Fatal error: Uncaught exception 'Error' with message 'Cannot access private property test::$pri' in %s:%d Stack trace: #0 {main} thrown in %s on line %d diff --git a/sapi/cli/tests/bug43177.phpt b/sapi/cli/tests/bug43177.phpt index c0a8da4d4dd11..23af545908d3f 100644 --- a/sapi/cli/tests/bug43177.phpt +++ b/sapi/cli/tests/bug43177.phpt @@ -13,7 +13,7 @@ php_cli_server_start(<<<'SCRIPT' case "/parse": try { eval("this is a parse error"); - } catch (ParseException $e) { + } catch (ParseError $e) { } echo "OK\n"; break; diff --git a/sapi/cli/tests/php_cli_server_015.phpt b/sapi/cli/tests/php_cli_server_015.phpt index fc7d0f2b9b47c..e50e5c1b5cd33 100644 --- a/sapi/cli/tests/php_cli_server_015.phpt +++ b/sapi/cli/tests/php_cli_server_015.phpt @@ -46,7 +46,7 @@ X-Powered-By: PHP/%s Content-type: text/html; charset=UTF-8
-Fatal error: Uncaught exception 'EngineException' with message 'Call to undefined function non_exists_function()' in %ssyntax_error.php:%d +Fatal error: Uncaught exception 'Error' with message 'Call to undefined function non_exists_function()' in %ssyntax_error.php:%d Stack trace: #0 %sindex.php(%d): require() #1 {main} diff --git a/tests/classes/abstract.phpt b/tests/classes/abstract.phpt index c827d27108167..9dd800e80b633 100644 --- a/tests/classes/abstract.phpt +++ b/tests/classes/abstract.phpt @@ -27,7 +27,7 @@ echo "Done\n"; // shouldn't be displayed --EXPECTF-- Call to function show() -Fatal error: Uncaught exception 'EngineException' with message 'Cannot call abstract method fail::show()' in %s:%d +Fatal error: Uncaught exception 'Error' with message 'Cannot call abstract method fail::show()' in %s:%d Stack trace: #0 %s(%d): pass->error() #1 {main} diff --git a/tests/classes/abstract_class.phpt b/tests/classes/abstract_class.phpt index 097cab13246c3..aa84b3c562b0b 100644 --- a/tests/classes/abstract_class.phpt +++ b/tests/classes/abstract_class.phpt @@ -26,7 +26,7 @@ echo "Done\n"; // shouldn't be displayed --EXPECTF-- Call to function show() -Fatal error: Uncaught exception 'EngineException' with message 'Cannot instantiate abstract class fail' in %s:%d +Fatal error: Uncaught exception 'Error' with message 'Cannot instantiate abstract class fail' in %s:%d Stack trace: #0 {main} thrown in %s on line %d diff --git a/tests/classes/abstract_inherit.phpt b/tests/classes/abstract_inherit.phpt index baf2a79f60e84..0b54bcf133320 100644 --- a/tests/classes/abstract_inherit.phpt +++ b/tests/classes/abstract_inherit.phpt @@ -19,7 +19,7 @@ echo "Done\n"; // Shouldn't be displayed ?> --EXPECTF-- -Fatal error: Uncaught exception 'EngineException' with message 'Cannot instantiate abstract class fail' in %s:%d +Fatal error: Uncaught exception 'Error' with message 'Cannot instantiate abstract class fail' in %s:%d Stack trace: #0 {main} thrown in %s on line %d diff --git a/tests/classes/abstract_user_call.phpt b/tests/classes/abstract_user_call.phpt index f19bb7c603cab..d04595335a0d6 100644 --- a/tests/classes/abstract_user_call.phpt +++ b/tests/classes/abstract_user_call.phpt @@ -27,7 +27,7 @@ call_user_func(array($o, 'test_base::func')); --EXPECTF-- test::func() -Fatal error: Uncaught exception 'EngineException' with message 'Cannot call abstract method test_base::func()' in %s:%d +Fatal error: Uncaught exception 'Error' with message 'Cannot call abstract method test_base::func()' in %s:%d Stack trace: #0 {main} thrown in %s on line %d diff --git a/tests/classes/array_access_012.phpt b/tests/classes/array_access_012.phpt index c37eaf246538c..0405495721b72 100644 --- a/tests/classes/array_access_012.phpt +++ b/tests/classes/array_access_012.phpt @@ -33,7 +33,7 @@ $data['element'] = &$test; Notice: Indirect modification of overloaded element of ArrayAccessImpl has no effect in %sarray_access_012.php on line 24 -Fatal error: Uncaught exception 'EngineException' with message 'Cannot assign by reference to overloaded object' in %sarray_access_012.php:24 +Fatal error: Uncaught exception 'Error' with message 'Cannot assign by reference to overloaded object' in %sarray_access_012.php:24 Stack trace: #0 {main} thrown in %sarray_access_012.php on line 24 diff --git a/tests/classes/autoload_021.phpt b/tests/classes/autoload_021.phpt index 5ec4ada9dfd9b..844dbd1316463 100644 --- a/tests/classes/autoload_021.phpt +++ b/tests/classes/autoload_021.phpt @@ -10,7 +10,7 @@ $x = new $a; echo "BUG\n"; ?> --EXPECTF-- -Fatal error: Uncaught exception 'EngineException' with message 'Class '../BUG' not found' in %sautoload_021.php:6 +Fatal error: Uncaught exception 'Error' with message 'Class '../BUG' not found' in %sautoload_021.php:6 Stack trace: #0 {main} thrown in %sautoload_021.php on line 6 diff --git a/tests/classes/bug27504.phpt b/tests/classes/bug27504.phpt index 14ab661daeb7e..a32b65d9c5cef 100644 --- a/tests/classes/bug27504.phpt +++ b/tests/classes/bug27504.phpt @@ -22,7 +22,7 @@ Called function foo:bar(1) Warning: call_user_func_array() expects parameter 1 to be a valid callback, cannot access private method foo::bar() in %s on line %d -Fatal error: Uncaught exception 'EngineException' with message 'Call to private method foo::bar() from context ''' in %s:%d +Fatal error: Uncaught exception 'Error' with message 'Call to private method foo::bar() from context ''' in %s:%d Stack trace: #0 {main} thrown in %s on line %d diff --git a/tests/classes/class_abstract.phpt b/tests/classes/class_abstract.phpt index 3de53c35dd31f..ca1a1dd5ce60e 100644 --- a/tests/classes/class_abstract.phpt +++ b/tests/classes/class_abstract.phpt @@ -25,7 +25,7 @@ echo "Done\n"; // shouldn't be displayed --EXPECTF-- base -Fatal error: Uncaught exception 'EngineException' with message 'Cannot instantiate abstract class base' in %s:%d +Fatal error: Uncaught exception 'Error' with message 'Cannot instantiate abstract class base' in %s:%d Stack trace: #0 {main} thrown in %s on line %d diff --git a/tests/classes/constants_basic_001.phpt b/tests/classes/constants_basic_001.phpt index a9fbcbb48e461..ae2310ed7c244 100644 --- a/tests/classes/constants_basic_001.phpt +++ b/tests/classes/constants_basic_001.phpt @@ -86,7 +86,7 @@ string(6) "hello2" Expecting fatal error: -Fatal error: Uncaught exception 'EngineException' with message 'Undefined class constant 'c19'' in %s:53 +Fatal error: Uncaught exception 'Error' with message 'Undefined class constant 'c19'' in %s:53 Stack trace: #0 {main} thrown in %s on line 53 diff --git a/tests/classes/ctor_visibility.phpt b/tests/classes/ctor_visibility.phpt index 5014b0fbe281a..dd218d1c5a5ef 100644 --- a/tests/classes/ctor_visibility.phpt +++ b/tests/classes/ctor_visibility.phpt @@ -66,7 +66,7 @@ Test::__construct() TestPriv::__construct() DerivedPriv::__construct() -Fatal error: Uncaught exception 'EngineException' with message 'Cannot call private TestPriv::__construct()' in %sctor_visibility.php:%d +Fatal error: Uncaught exception 'Error' with message 'Cannot call private TestPriv::__construct()' in %sctor_visibility.php:%d Stack trace: #0 %s(%d): DerivedPriv->__construct() #1 %s(%d): DerivedPriv::f() diff --git a/tests/classes/destructor_visibility_001.phpt b/tests/classes/destructor_visibility_001.phpt index 0b3a3aa7d0e05..4bcb4000c6b5f 100644 --- a/tests/classes/destructor_visibility_001.phpt +++ b/tests/classes/destructor_visibility_001.phpt @@ -21,7 +21,7 @@ unset($obj); ?> ===DONE=== --EXPECTF-- -Fatal error: Uncaught exception 'EngineException' with message 'Call to private Derived::__destruct() from context ''' in %sdestructor_visibility_001.php:%d +Fatal error: Uncaught exception 'Error' with message 'Call to private Derived::__destruct() from context ''' in %sdestructor_visibility_001.php:%d Stack trace: #0 {main} thrown in %sdestructor_visibility_001.php on line %d diff --git a/tests/classes/factory_and_singleton_003.phpt b/tests/classes/factory_and_singleton_003.phpt index 5dcb67a0c23a4..1ad37994dd800 100644 --- a/tests/classes/factory_and_singleton_003.phpt +++ b/tests/classes/factory_and_singleton_003.phpt @@ -15,7 +15,7 @@ $obj = new test; echo "Done\n"; ?> --EXPECTF-- -Fatal error: Uncaught exception 'EngineException' with message 'Call to protected test::__construct() from invalid context' in %s:%d +Fatal error: Uncaught exception 'Error' with message 'Call to protected test::__construct() from invalid context' in %s:%d Stack trace: #0 {main} thrown in %s on line %d diff --git a/tests/classes/factory_and_singleton_004.phpt b/tests/classes/factory_and_singleton_004.phpt index c3787c05fc51b..9f473baf5b756 100644 --- a/tests/classes/factory_and_singleton_004.phpt +++ b/tests/classes/factory_and_singleton_004.phpt @@ -15,7 +15,7 @@ $obj = new test; echo "Done\n"; ?> --EXPECTF-- -Fatal error: Uncaught exception 'EngineException' with message 'Call to private test::__construct() from invalid context' in %s:%d +Fatal error: Uncaught exception 'Error' with message 'Call to private test::__construct() from invalid context' in %s:%d Stack trace: #0 {main} thrown in %s on line %d diff --git a/tests/classes/factory_and_singleton_005.phpt b/tests/classes/factory_and_singleton_005.phpt index c9c9e34ebba14..b8b1b69d76fdf 100644 --- a/tests/classes/factory_and_singleton_005.phpt +++ b/tests/classes/factory_and_singleton_005.phpt @@ -16,7 +16,7 @@ $obj = NULL; echo "Done\n"; ?> --EXPECTF-- -Fatal error: Uncaught exception 'EngineException' with message 'Call to protected test::__destruct() from context ''' in %sfactory_and_singleton_005.php:%d +Fatal error: Uncaught exception 'Error' with message 'Call to protected test::__destruct() from context ''' in %sfactory_and_singleton_005.php:%d Stack trace: #0 {main} thrown in %sfactory_and_singleton_005.php on line %d diff --git a/tests/classes/factory_and_singleton_006.phpt b/tests/classes/factory_and_singleton_006.phpt index 8773ec6cd4522..117691715504d 100644 --- a/tests/classes/factory_and_singleton_006.phpt +++ b/tests/classes/factory_and_singleton_006.phpt @@ -16,7 +16,7 @@ $obj = NULL; echo "Done\n"; ?> --EXPECTF-- -Fatal error: Uncaught exception 'EngineException' with message 'Call to private test::__destruct() from context ''' in %sfactory_and_singleton_006.php:%d +Fatal error: Uncaught exception 'Error' with message 'Call to private test::__destruct() from context ''' in %sfactory_and_singleton_006.php:%d Stack trace: #0 {main} thrown in %sfactory_and_singleton_006.php on line %d diff --git a/tests/classes/factory_and_singleton_007.phpt b/tests/classes/factory_and_singleton_007.phpt index 5dd40512573fe..04b402a487c2c 100644 --- a/tests/classes/factory_and_singleton_007.phpt +++ b/tests/classes/factory_and_singleton_007.phpt @@ -17,7 +17,7 @@ $obj = NULL; echo "Done\n"; ?> --EXPECTF-- -Fatal error: Uncaught exception 'EngineException' with message 'Call to protected test::__clone() from context ''' in %s:%d +Fatal error: Uncaught exception 'Error' with message 'Call to protected test::__clone() from context ''' in %s:%d Stack trace: #0 {main} thrown in %s on line %d diff --git a/tests/classes/factory_and_singleton_008.phpt b/tests/classes/factory_and_singleton_008.phpt index 90c3ada4bb100..624d6fbaa9c66 100644 --- a/tests/classes/factory_and_singleton_008.phpt +++ b/tests/classes/factory_and_singleton_008.phpt @@ -17,7 +17,7 @@ $obj = NULL; echo "Done\n"; ?> --EXPECTF-- -Fatal error: Uncaught exception 'EngineException' with message 'Call to private test::__clone() from context ''' in %s:%d +Fatal error: Uncaught exception 'Error' with message 'Call to private test::__clone() from context ''' in %s:%d Stack trace: #0 {main} thrown in %s on line %d diff --git a/tests/classes/interface_instantiate.phpt b/tests/classes/interface_instantiate.phpt index a89f173aa4dd6..bc3a0236f2d56 100644 --- a/tests/classes/interface_instantiate.phpt +++ b/tests/classes/interface_instantiate.phpt @@ -13,7 +13,7 @@ $t = new if_a(); ?> --EXPECTF-- -Fatal error: Uncaught exception 'EngineException' with message 'Cannot instantiate interface if_a' in %s:%d +Fatal error: Uncaught exception 'Error' with message 'Cannot instantiate interface if_a' in %s:%d Stack trace: #0 {main} thrown in %s on line %d diff --git a/tests/classes/interfaces_001.phpt b/tests/classes/interfaces_001.phpt index 41e1f6776d895..68f85512e7c33 100644 --- a/tests/classes/interfaces_001.phpt +++ b/tests/classes/interfaces_001.phpt @@ -5,11 +5,11 @@ ZE2 interfaces --FILE-- getMessage() . "\n"; ===DONE=== --EXPECTF-- -Fatal error: Class Exception_foo contains 1 abstract method and must therefore be declared abstract or implement the remaining methods (Throwable::getErrno) in %s on line %d +Fatal error: Class Exception_foo contains 1 abstract method and must therefore be declared abstract or implement the remaining methods (ThrowableInterface::getErrno) in %s on line %d diff --git a/tests/classes/private_001.phpt b/tests/classes/private_001.phpt index a6b27235b0fa7..2bedd6aced8ef 100644 --- a/tests/classes/private_001.phpt +++ b/tests/classes/private_001.phpt @@ -23,7 +23,7 @@ echo "Done\n"; // shouldn't be displayed --EXPECTF-- Call show() -Fatal error: Uncaught exception 'EngineException' with message 'Call to private method pass::show() from context ''' in %s:%d +Fatal error: Uncaught exception 'Error' with message 'Call to private method pass::show() from context ''' in %s:%d Stack trace: #0 {main} thrown in %s on line %d diff --git a/tests/classes/private_002.phpt b/tests/classes/private_002.phpt index 7cb41e7e7fc35..333c406cc16ba 100644 --- a/tests/classes/private_002.phpt +++ b/tests/classes/private_002.phpt @@ -32,7 +32,7 @@ echo "Done\n"; // shouldn't be displayed Call pass::show() Call fail::show() -Fatal error: Uncaught exception 'EngineException' with message 'Call to private method pass::show() from context 'fail'' in %s:%d +Fatal error: Uncaught exception 'Error' with message 'Call to private method pass::show() from context 'fail'' in %s:%d Stack trace: #0 %s(%d): fail::show() #1 {main} diff --git a/tests/classes/private_003.phpt b/tests/classes/private_003.phpt index c8209457bdfca..d7d42ce1d3f7b 100644 --- a/tests/classes/private_003.phpt +++ b/tests/classes/private_003.phpt @@ -33,7 +33,7 @@ echo "Done\n"; // shouldn't be displayed --EXPECTF-- Call show() -Fatal error: Uncaught exception 'EngineException' with message 'Call to private method pass::show() from context 'fail'' in %s:%d +Fatal error: Uncaught exception 'Error' with message 'Call to private method pass::show() from context 'fail'' in %s:%d Stack trace: #0 %s(%d): fail::not_ok() #1 {main} diff --git a/tests/classes/private_003b.phpt b/tests/classes/private_003b.phpt index a4f7701ada4e2..2b77d84c468d8 100644 --- a/tests/classes/private_003b.phpt +++ b/tests/classes/private_003b.phpt @@ -34,7 +34,7 @@ echo "Done\n"; // shouldn't be displayed --EXPECTF-- Call show() -Fatal error: Uncaught exception 'EngineException' with message 'Call to private method pass::show() from context 'fail'' in %s:%d +Fatal error: Uncaught exception 'Error' with message 'Call to private method pass::show() from context 'fail'' in %s:%d Stack trace: #0 %s(%d): fail->not_ok() #1 {main} diff --git a/tests/classes/private_004.phpt b/tests/classes/private_004.phpt index 379cc27a590bc..326c23da4fc04 100644 --- a/tests/classes/private_004.phpt +++ b/tests/classes/private_004.phpt @@ -29,7 +29,7 @@ echo "Done\n"; // shouldn't be displayed --EXPECTF-- Call show() -Fatal error: Uncaught exception 'EngineException' with message 'Call to private method pass::show() from context 'fail'' in %s:%d +Fatal error: Uncaught exception 'Error' with message 'Call to private method pass::show() from context 'fail'' in %s:%d Stack trace: #0 %s(%d): fail::do_show() #1 {main} diff --git a/tests/classes/private_004b.phpt b/tests/classes/private_004b.phpt index 91433aadc1767..85ac9433e4106 100644 --- a/tests/classes/private_004b.phpt +++ b/tests/classes/private_004b.phpt @@ -32,7 +32,7 @@ echo "Done\n"; // shouldn't be displayed --EXPECTF-- Call show() -Fatal error: Uncaught exception 'EngineException' with message 'Call to private method pass::show() from context 'fail'' in %s:%d +Fatal error: Uncaught exception 'Error' with message 'Call to private method pass::show() from context 'fail'' in %s:%d Stack trace: #0 %s(%d): fail->do_show() #1 {main} diff --git a/tests/classes/private_005.phpt b/tests/classes/private_005.phpt index 32c05fe35854f..41314d25afebd 100644 --- a/tests/classes/private_005.phpt +++ b/tests/classes/private_005.phpt @@ -29,7 +29,7 @@ echo "Done\n"; // shouldn't be displayed --EXPECTF-- Call show() -Fatal error: Uncaught exception 'EngineException' with message 'Call to private method pass::show() from context 'fail'' in %s:%d +Fatal error: Uncaught exception 'Error' with message 'Call to private method pass::show() from context 'fail'' in %s:%d Stack trace: #0 %s(%d): fail::do_show() #1 {main} diff --git a/tests/classes/private_005b.phpt b/tests/classes/private_005b.phpt index 91433aadc1767..85ac9433e4106 100644 --- a/tests/classes/private_005b.phpt +++ b/tests/classes/private_005b.phpt @@ -32,7 +32,7 @@ echo "Done\n"; // shouldn't be displayed --EXPECTF-- Call show() -Fatal error: Uncaught exception 'EngineException' with message 'Call to private method pass::show() from context 'fail'' in %s:%d +Fatal error: Uncaught exception 'Error' with message 'Call to private method pass::show() from context 'fail'' in %s:%d Stack trace: #0 %s(%d): fail->do_show() #1 {main} diff --git a/tests/classes/private_redeclare.phpt b/tests/classes/private_redeclare.phpt index 067cd7d9d2056..75200b19e4708 100644 --- a/tests/classes/private_redeclare.phpt +++ b/tests/classes/private_redeclare.phpt @@ -35,7 +35,7 @@ test derived base -Fatal error: Uncaught exception 'EngineException' with message 'Call to private method base::show() from context 'derived'' in %s:%d +Fatal error: Uncaught exception 'Error' with message 'Call to private method base::show() from context 'derived'' in %s:%d Stack trace: #0 %s(%d): derived->test() #1 {main} diff --git a/tests/classes/property_recreate_private.phpt b/tests/classes/property_recreate_private.phpt index fe7c7d249ffcb..019e406d0b9dd 100644 --- a/tests/classes/property_recreate_private.phpt +++ b/tests/classes/property_recreate_private.phpt @@ -78,7 +78,7 @@ object(C)#%d (1) { Unset a private property, and attempt to recreate at global scope (expecting failure): -Fatal error: Uncaught exception 'EngineException' with message 'Cannot access private property C::$p' in %s:46 +Fatal error: Uncaught exception 'Error' with message 'Cannot access private property C::$p' in %s:46 Stack trace: #0 {main} thrown in %s on line 46 diff --git a/tests/classes/property_recreate_protected.phpt b/tests/classes/property_recreate_protected.phpt index 01d156bff29fc..b3efedee79597 100644 --- a/tests/classes/property_recreate_protected.phpt +++ b/tests/classes/property_recreate_protected.phpt @@ -50,7 +50,7 @@ object(D)#%d (1) { Unset a protected property, and attempt to recreate it outside of scope (expected failure): -Fatal error: Uncaught exception 'EngineException' with message 'Cannot access protected property %s::$p' in %s:32 +Fatal error: Uncaught exception 'Error' with message 'Cannot access protected property %s::$p' in %s:32 Stack trace: #0 {main} thrown in %s on line 32 diff --git a/tests/classes/protected_001.phpt b/tests/classes/protected_001.phpt index dce77ac66670c..8104e28a84ed3 100644 --- a/tests/classes/protected_001.phpt +++ b/tests/classes/protected_001.phpt @@ -23,7 +23,7 @@ echo "Done\n"; // shouldn't be displayed --EXPECTF-- Call fail() -Fatal error: Uncaught exception 'EngineException' with message 'Call to protected method pass::fail() from context ''' in %s:%d +Fatal error: Uncaught exception 'Error' with message 'Call to protected method pass::fail() from context ''' in %s:%d Stack trace: #0 {main} thrown in %s on line %d diff --git a/tests/classes/protected_001b.phpt b/tests/classes/protected_001b.phpt index c9139c711dcc3..62ce61fef5cac 100644 --- a/tests/classes/protected_001b.phpt +++ b/tests/classes/protected_001b.phpt @@ -24,7 +24,7 @@ echo "Done\n"; // shouldn't be displayed --EXPECTF-- Call fail() -Fatal error: Uncaught exception 'EngineException' with message 'Call to protected method pass::fail() from context ''' in %s:%d +Fatal error: Uncaught exception 'Error' with message 'Call to protected method pass::fail() from context ''' in %s:%d Stack trace: #0 {main} thrown in %s on line %d diff --git a/tests/classes/protected_002.phpt b/tests/classes/protected_002.phpt index 837cc552ae229..c71d3bc214c41 100644 --- a/tests/classes/protected_002.phpt +++ b/tests/classes/protected_002.phpt @@ -32,7 +32,7 @@ echo "Done\n"; // shouldn't be displayed Call pass::show() Call fail::show() -Fatal error: Uncaught exception 'EngineException' with message 'Call to protected method pass::show() from context 'fail'' in %s:%d +Fatal error: Uncaught exception 'Error' with message 'Call to protected method pass::show() from context 'fail'' in %s:%d Stack trace: #0 %s(%d): fail::show() #1 {main} diff --git a/tests/classes/static_properties_003_error1.phpt b/tests/classes/static_properties_003_error1.phpt index b7673f70d53e3..4db201a52a952 100644 --- a/tests/classes/static_properties_003_error1.phpt +++ b/tests/classes/static_properties_003_error1.phpt @@ -15,7 +15,7 @@ unset($c->y); --> Access non-visible static prop like instance prop: -Fatal error: Uncaught exception 'EngineException' with message 'Cannot access protected property C::$y' in %s:8 +Fatal error: Uncaught exception 'Error' with message 'Cannot access protected property C::$y' in %s:8 Stack trace: #0 {main} thrown in %s on line 8 diff --git a/tests/classes/static_properties_003_error2.phpt b/tests/classes/static_properties_003_error2.phpt index 3183e2f73a9ef..abc57073e752a 100644 --- a/tests/classes/static_properties_003_error2.phpt +++ b/tests/classes/static_properties_003_error2.phpt @@ -15,7 +15,7 @@ echo $c->y; --> Access non-visible static prop like instance prop: -Fatal error: Uncaught exception 'EngineException' with message 'Cannot access protected property C::$y' in %s:8 +Fatal error: Uncaught exception 'Error' with message 'Cannot access protected property C::$y' in %s:8 Stack trace: #0 {main} thrown in %s on line 8 diff --git a/tests/classes/static_properties_003_error3.phpt b/tests/classes/static_properties_003_error3.phpt index f0368a3763970..8fad30ff294ee 100644 --- a/tests/classes/static_properties_003_error3.phpt +++ b/tests/classes/static_properties_003_error3.phpt @@ -15,7 +15,7 @@ $c->y = 1; --> Access non-visible static prop like instance prop: -Fatal error: Uncaught exception 'EngineException' with message 'Cannot access protected property C::$y' in %s:8 +Fatal error: Uncaught exception 'Error' with message 'Cannot access protected property C::$y' in %s:8 Stack trace: #0 {main} thrown in %s on line 8 diff --git a/tests/classes/static_properties_003_error4.phpt b/tests/classes/static_properties_003_error4.phpt index a6fa9d4044eed..22bf444c36b9a 100644 --- a/tests/classes/static_properties_003_error4.phpt +++ b/tests/classes/static_properties_003_error4.phpt @@ -15,11 +15,11 @@ $c->y =& $ref; --> Access non-visible static prop like instance prop: -Fatal error: Uncaught exception 'EngineException' with message 'Cannot access protected property C::$y' in %s:8 +Fatal error: Uncaught exception 'Error' with message 'Cannot access protected property C::$y' in %s:8 Stack trace: #0 {main} -Next exception 'EngineException' with message 'Cannot access protected property C::$y' in %s:8 +Next exception 'Error' with message 'Cannot access protected property C::$y' in %s:8 Stack trace: #0 {main} thrown in %s on line 8 diff --git a/tests/classes/static_properties_undeclared_assign.phpt b/tests/classes/static_properties_undeclared_assign.phpt index d2918fa509932..2c515f1b7819e 100644 --- a/tests/classes/static_properties_undeclared_assign.phpt +++ b/tests/classes/static_properties_undeclared_assign.phpt @@ -6,7 +6,7 @@ Class C {} C::$p = 1; ?> --EXPECTF-- -Fatal error: Uncaught exception 'EngineException' with message 'Access to undeclared static property: C::$p' in %s:3 +Fatal error: Uncaught exception 'Error' with message 'Access to undeclared static property: C::$p' in %s:3 Stack trace: #0 {main} thrown in %s on line 3 diff --git a/tests/classes/static_properties_undeclared_assignInc.phpt b/tests/classes/static_properties_undeclared_assignInc.phpt index bd015a048306e..a53b9c52d2c79 100644 --- a/tests/classes/static_properties_undeclared_assignInc.phpt +++ b/tests/classes/static_properties_undeclared_assignInc.phpt @@ -6,7 +6,7 @@ Class C {} C::$p += 1; ?> --EXPECTF-- -Fatal error: Uncaught exception 'EngineException' with message 'Access to undeclared static property: C::$p' in %s:3 +Fatal error: Uncaught exception 'Error' with message 'Access to undeclared static property: C::$p' in %s:3 Stack trace: #0 {main} thrown in %s on line 3 diff --git a/tests/classes/static_properties_undeclared_assignRef.phpt b/tests/classes/static_properties_undeclared_assignRef.phpt index 4b01191616250..20eda3d93443e 100644 --- a/tests/classes/static_properties_undeclared_assignRef.phpt +++ b/tests/classes/static_properties_undeclared_assignRef.phpt @@ -7,7 +7,7 @@ $a = 'foo'; C::$p =& $a; ?> --EXPECTF-- -Fatal error: Uncaught exception 'EngineException' with message 'Access to undeclared static property: C::$p' in %s:4 +Fatal error: Uncaught exception 'Error' with message 'Access to undeclared static property: C::$p' in %s:4 Stack trace: #0 {main} thrown in %s on line 4 diff --git a/tests/classes/static_properties_undeclared_inc.phpt b/tests/classes/static_properties_undeclared_inc.phpt index 2b5359063ff1c..273674a307adb 100644 --- a/tests/classes/static_properties_undeclared_inc.phpt +++ b/tests/classes/static_properties_undeclared_inc.phpt @@ -6,7 +6,7 @@ Class C {} C::$p++; ?> --EXPECTF-- -Fatal error: Uncaught exception 'EngineException' with message 'Access to undeclared static property: C::$p' in %s:3 +Fatal error: Uncaught exception 'Error' with message 'Access to undeclared static property: C::$p' in %s:3 Stack trace: #0 {main} thrown in %s on line 3 diff --git a/tests/classes/static_properties_undeclared_read.phpt b/tests/classes/static_properties_undeclared_read.phpt index 13dc6ed7487bd..e6ac05a90d71b 100644 --- a/tests/classes/static_properties_undeclared_read.phpt +++ b/tests/classes/static_properties_undeclared_read.phpt @@ -6,7 +6,7 @@ Class C {} echo C::$p; ?> --EXPECTF-- -Fatal error: Uncaught exception 'EngineException' with message 'Access to undeclared static property: C::$p' in %s:3 +Fatal error: Uncaught exception 'Error' with message 'Access to undeclared static property: C::$p' in %s:3 Stack trace: #0 {main} thrown in %s on line 3 diff --git a/tests/classes/type_hinting_004.phpt b/tests/classes/type_hinting_004.phpt index d533699b8b7cf..c5f8d3984b7c9 100644 --- a/tests/classes/type_hinting_004.phpt +++ b/tests/classes/type_hinting_004.phpt @@ -18,32 +18,32 @@ Ensure type hints are enforced for functions invoked as callbacks. } try { call_user_func('f1', 1); - } catch (EngineException $ex) { + } catch (Error $ex) { echo "{$ex->getCode()}: {$ex->getMessage()} - {$ex->getFile()}({$ex->getLine()})\n\n"; } try { call_user_func('f1', new A); - } catch (EngineException $ex) { + } catch (Error $ex) { echo "{$ex->getCode()}: {$ex->getMessage()} - {$ex->getFile()}({$ex->getLine()})\n\n"; } try { call_user_func('f2', 1); - } catch (EngineException $ex) { + } catch (Error $ex) { echo "{$ex->getCode()}: {$ex->getMessage()} - {$ex->getFile()}({$ex->getLine()})\n\n"; } try { call_user_func('f2'); - } catch (EngineException $ex) { + } catch (Error $ex) { echo "{$ex->getCode()}: {$ex->getMessage()} - {$ex->getFile()}({$ex->getLine()})\n\n"; } try { call_user_func('f2', new A); - } catch (EngineException $ex) { + } catch (Error $ex) { echo "{$ex->getCode()}: {$ex->getMessage()} - {$ex->getFile()}({$ex->getLine()})\n\n"; } try { call_user_func('f2', null); - } catch (EngineException $ex) { + } catch (Error $ex) { echo "{$ex->getCode()}: {$ex->getMessage()} - {$ex->getFile()}({$ex->getLine()})\n\n"; } @@ -67,32 +67,32 @@ Ensure type hints are enforced for functions invoked as callbacks. try { call_user_func(array('C', 'f1'), 1); - } catch (EngineException $ex) { + } catch (Error $ex) { echo "{$ex->getCode()}: {$ex->getMessage()} - {$ex->getFile()}({$ex->getLine()})\n\n"; } try { call_user_func(array('C', 'f1'), new A); - } catch (EngineException $ex) { + } catch (Error $ex) { echo "{$ex->getCode()}: {$ex->getMessage()} - {$ex->getFile()}({$ex->getLine()})\n\n"; } try { call_user_func(array('C', 'f2'), 1); - } catch (EngineException $ex) { + } catch (Error $ex) { echo "{$ex->getCode()}: {$ex->getMessage()} - {$ex->getFile()}({$ex->getLine()})\n\n"; } try { call_user_func(array('C', 'f2')); - } catch (EngineException $ex) { + } catch (Error $ex) { echo "{$ex->getCode()}: {$ex->getMessage()} - {$ex->getFile()}({$ex->getLine()})\n\n"; } try { call_user_func(array('C', 'f2'), new A); - } catch (EngineException $ex) { + } catch (Error $ex) { echo "{$ex->getCode()}: {$ex->getMessage()} - {$ex->getFile()}({$ex->getLine()})\n\n"; } try { call_user_func(array('C', 'f2'), null); - } catch (EngineException $ex) { + } catch (Error $ex) { echo "{$ex->getCode()}: {$ex->getMessage()} - {$ex->getFile()}({$ex->getLine()})\n\n"; } @@ -117,32 +117,32 @@ Ensure type hints are enforced for functions invoked as callbacks. try { call_user_func(array($d, 'f1'), 1); - } catch (EngineException $ex) { + } catch (Error $ex) { echo "{$ex->getCode()}: {$ex->getMessage()} - {$ex->getFile()}({$ex->getLine()})\n\n"; } try { call_user_func(array($d, 'f1'), new A); - } catch (EngineException $ex) { + } catch (Error $ex) { echo "{$ex->getCode()}: {$ex->getMessage()} - {$ex->getFile()}({$ex->getLine()})\n\n"; } try { call_user_func(array($d, 'f2'), 1); - } catch (EngineException $ex) { + } catch (Error $ex) { echo "{$ex->getCode()}: {$ex->getMessage()} - {$ex->getFile()}({$ex->getLine()})\n\n"; } try { call_user_func(array($d, 'f2')); - } catch (EngineException $ex) { + } catch (Error $ex) { echo "{$ex->getCode()}: {$ex->getMessage()} - {$ex->getFile()}({$ex->getLine()})\n\n"; } try { call_user_func(array($d, 'f2'), new A); - } catch (EngineException $ex) { + } catch (Error $ex) { echo "{$ex->getCode()}: {$ex->getMessage()} - {$ex->getFile()}({$ex->getLine()})\n\n"; } try { call_user_func(array($d, 'f2'), null); - } catch (EngineException $ex) { + } catch (Error $ex) { echo "{$ex->getCode()}: {$ex->getMessage()} - {$ex->getFile()}({$ex->getLine()})\n\n"; } diff --git a/tests/lang/041.phpt b/tests/lang/041.phpt index 72ab0e4a62e5a..eef75bdb3fa2f 100644 --- a/tests/lang/041.phpt +++ b/tests/lang/041.phpt @@ -17,7 +17,7 @@ echo $wrongClassname::$b."\n"; --EXPECTF-- foo -Fatal error: Uncaught exception 'EngineException' with message 'Class 'B' not found' in %s041.php:%d +Fatal error: Uncaught exception 'Error' with message 'Class 'B' not found' in %s041.php:%d Stack trace: #0 {main} thrown in %s041.php on line %d diff --git a/tests/lang/042.phpt b/tests/lang/042.phpt index ad6e081222d39..6e6ae419b25c1 100644 --- a/tests/lang/042.phpt +++ b/tests/lang/042.phpt @@ -16,7 +16,7 @@ echo $wrongClassname::B."\n"; --EXPECTF-- foo -Fatal error: Uncaught exception 'EngineException' with message 'Class 'B' not found' in %s042.php:%d +Fatal error: Uncaught exception 'Error' with message 'Class 'B' not found' in %s042.php:%d Stack trace: #0 {main} thrown in %s042.php on line %d diff --git a/tests/lang/043.phpt b/tests/lang/043.phpt index 8425d9f3d3819..444cc23be6409 100644 --- a/tests/lang/043.phpt +++ b/tests/lang/043.phpt @@ -16,7 +16,7 @@ echo $wrongClassname::foo()."\n"; --EXPECTF-- foo -Fatal error: Uncaught exception 'EngineException' with message 'Class 'B' not found' in %s043.php:%d +Fatal error: Uncaught exception 'Error' with message 'Class 'B' not found' in %s043.php:%d Stack trace: #0 {main} thrown in %s043.php on line %d diff --git a/tests/lang/044.phpt b/tests/lang/044.phpt index bc5900a301ec8..87255061ba870 100644 --- a/tests/lang/044.phpt +++ b/tests/lang/044.phpt @@ -18,7 +18,7 @@ echo $wrongClassname::$methodname()."\n"; --EXPECTF-- foo -Fatal error: Uncaught exception 'EngineException' with message 'Class 'B' not found' in %s044.php:%d +Fatal error: Uncaught exception 'Error' with message 'Class 'B' not found' in %s044.php:%d Stack trace: #0 {main} thrown in %s044.php on line %d diff --git a/tests/lang/catchable_error_002.phpt b/tests/lang/catchable_error_002.phpt index bc585f7b108f6..10312533c17e1 100644 --- a/tests/lang/catchable_error_002.phpt +++ b/tests/lang/catchable_error_002.phpt @@ -19,7 +19,7 @@ Catchable fatal error [2] try { blah (new StdClass); - } catch (engineException $ex) { + } catch (Error $ex) { echo $ex->getMessage(), "\n"; } echo "ALIVE!\n"; diff --git a/tests/lang/foreachLoopIterator.002.phpt b/tests/lang/foreachLoopIterator.002.phpt index 713aaaa8f8299..113d7c1ac20a3 100644 --- a/tests/lang/foreachLoopIterator.002.phpt +++ b/tests/lang/foreachLoopIterator.002.phpt @@ -21,7 +21,7 @@ foreach ($f as $k=>&$v) { --EXPECTF-- -----( Try to iterate with &$value: )----- -Fatal error: Uncaught exception 'EngineException' with message 'An iterator cannot be used with foreach by reference' in %s:13 +Fatal error: Uncaught exception 'Error' with message 'An iterator cannot be used with foreach by reference' in %s:13 Stack trace: #0 {main} thrown in %s on line 13 From b965bab9f143edceec285bf56b681c839b02f288 Mon Sep 17 00:00:00 2001 From: Aaron Piotrowski Date: Sat, 16 May 2015 19:06:59 -0500 Subject: [PATCH 03/18] Fix handler double copy. --- Zend/zend_exceptions.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/Zend/zend_exceptions.c b/Zend/zend_exceptions.c index 484fcdca60ccf..96e426130e01f 100644 --- a/Zend/zend_exceptions.c +++ b/Zend/zend_exceptions.c @@ -767,10 +767,11 @@ void zend_register_default_exception(void) /* {{{ */ INIT_CLASS_ENTRY(ce, "Exception", default_exception_functions); default_exception_ce = zend_register_internal_class_ex(&ce, NULL); default_exception_ce->create_object = zend_default_exception_new; + zend_class_implements(default_exception_ce, 1, zend_ce_throwable); + memcpy(&default_exception_handlers, zend_get_std_object_handlers(), sizeof(zend_object_handlers)); default_exception_handlers.clone_obj = NULL; - zend_class_implements(default_exception_ce, 1, zend_ce_throwable); - + zend_declare_property_string(default_exception_ce, "message", sizeof("message")-1, "", ZEND_ACC_PROTECTED); zend_declare_property_string(default_exception_ce, "string", sizeof("string")-1, "", ZEND_ACC_PRIVATE); zend_declare_property_long(default_exception_ce, "code", sizeof("code")-1, 0, ZEND_ACC_PROTECTED); @@ -787,10 +788,8 @@ void zend_register_default_exception(void) /* {{{ */ INIT_CLASS_ENTRY(ce, "Error", default_exception_functions); error_ce = zend_register_internal_class_ex(&ce, NULL); error_ce->create_object = zend_default_exception_new; - memcpy(&default_exception_handlers, zend_get_std_object_handlers(), sizeof(zend_object_handlers)); - default_exception_handlers.clone_obj = NULL; zend_class_implements(error_ce, 1, zend_ce_throwable); - + zend_declare_property_string(error_ce, "message", sizeof("message")-1, "", ZEND_ACC_PROTECTED); zend_declare_property_string(error_ce, "string", sizeof("string")-1, "", ZEND_ACC_PRIVATE); zend_declare_property_long(error_ce, "code", sizeof("code")-1, 0, ZEND_ACC_PROTECTED); From 434a46612e05c079da1116960cf2a2d28f4d8256 Mon Sep 17 00:00:00 2001 From: Aaron Piotrowski Date: Sat, 16 May 2015 21:57:14 -0500 Subject: [PATCH 04/18] Fix a few missed tests. --- ext/intl/tests/formatter_fail.phpt | 2 +- ext/intl/tests/msgfmt_fail.phpt | 2 +- ext/intl/tests/msgfmt_fail2.phpt | 2 +- sapi/cli/tests/005.phpt | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/ext/intl/tests/formatter_fail.phpt b/ext/intl/tests/formatter_fail.phpt index 2e3360f3c7434..72335e2022097 100644 --- a/ext/intl/tests/formatter_fail.phpt +++ b/ext/intl/tests/formatter_fail.phpt @@ -21,7 +21,7 @@ function crt($t, $l, $s) { case $t == "O": try { return new NumberFormatter($l, $s); - } catch (BaseException $e) { + } catch (Throwable $e) { print_exception($e); return null; } diff --git a/ext/intl/tests/msgfmt_fail.phpt b/ext/intl/tests/msgfmt_fail.phpt index 8ee72d1ef5964..daeaa8f677ceb 100644 --- a/ext/intl/tests/msgfmt_fail.phpt +++ b/ext/intl/tests/msgfmt_fail.phpt @@ -22,7 +22,7 @@ function crt($t, $l, $s) { case $t == "O": try { return new MessageFormatter($l, $s); - } catch (BaseException $e) { + } catch (Throwable $e) { print_exception($e); return null; } diff --git a/ext/intl/tests/msgfmt_fail2.phpt b/ext/intl/tests/msgfmt_fail2.phpt index 87c1edec75e78..5dcd09ccc8759 100644 --- a/ext/intl/tests/msgfmt_fail2.phpt +++ b/ext/intl/tests/msgfmt_fail2.phpt @@ -22,7 +22,7 @@ function crt($t, $l, $s) { case $t == "O": try { return new MessageFormatter($l, $s); - } catch (BaseException $e) { + } catch (Throwable $e) { print_exception($e); return null; } diff --git a/sapi/cli/tests/005.phpt b/sapi/cli/tests/005.phpt index b7825e673fc51..051605f70aff8 100644 --- a/sapi/cli/tests/005.phpt +++ b/sapi/cli/tests/005.phpt @@ -40,7 +40,7 @@ string(183) "Class [ class stdClass ] { } " -string(1368) "Class [ class Exception implements Throwable ] { +string(1376) "Class [ class Exception implements Throwable ] { - Constants [0] { } From 26b35cab46d20937724fe97682d630603ef799d3 Mon Sep 17 00:00:00 2001 From: Aaron Piotrowski Date: Sun, 17 May 2015 11:15:32 -0500 Subject: [PATCH 05/18] Make zend_get_exception_base static. Soap extension can use other API functions. --- Zend/zend_exceptions.c | 8 ++------ Zend/zend_exceptions.h | 2 -- ext/soap/soap.c | 4 ++-- 3 files changed, 4 insertions(+), 10 deletions(-) diff --git a/Zend/zend_exceptions.c b/Zend/zend_exceptions.c index 96e426130e01f..b44bb95661c9f 100644 --- a/Zend/zend_exceptions.c +++ b/Zend/zend_exceptions.c @@ -38,13 +38,9 @@ static zend_class_entry *type_error_ce; static zend_object_handlers default_exception_handlers; ZEND_API void (*zend_throw_exception_hook)(zval *ex); -ZEND_API zend_class_entry *zend_get_exception_base(zval *object) +static zend_class_entry *zend_get_exception_base(zval *object) { - if (instanceof_function(Z_OBJCE_P(object), error_ce)) { - return error_ce; - } - - return default_exception_ce; + return instanceof_function(Z_OBJCE_P(object), default_exception_ce) ? default_exception_ce : error_ce; } void zend_exception_set_previous(zend_object *exception, zend_object *add_previous) diff --git a/Zend/zend_exceptions.h b/Zend/zend_exceptions.h index bae4c35a78f24..6f7ceed78eb97 100644 --- a/Zend/zend_exceptions.h +++ b/Zend/zend_exceptions.h @@ -34,8 +34,6 @@ ZEND_API void zend_throw_exception_internal(zval *exception); void zend_register_default_exception(void); -ZEND_API zend_class_entry *zend_get_exception_base(zval *object); - ZEND_API zend_class_entry *zend_exception_get_default(void); ZEND_API zend_class_entry *zend_get_error_exception(void); ZEND_API zend_class_entry *zend_get_error(void); diff --git a/ext/soap/soap.c b/ext/soap/soap.c index e6c7e5f4cd79d..05c7b857f3cd2 100644 --- a/ext/soap/soap.c +++ b/ext/soap/soap.c @@ -1499,7 +1499,7 @@ static void _soap_server_exception(soapServicePtr service, sdlFunctionPtr functi } else if (instanceof_function(Z_OBJCE(exception_object), zend_get_error())) { if (service->send_errors) { zval rv; - zend_string *msg = zval_get_string(zend_read_property(zend_get_exception_base(&exception_object), &exception_object, "message", sizeof("message")-1, 0, &rv)); + zend_string *msg = zval_get_string(zend_read_property(zend_get_error(), &exception_object, "message", sizeof("message")-1, 0, &rv)); add_soap_fault_ex(&exception_object, this_ptr, "Server", msg->val, NULL, NULL); zend_string_release(msg); } else { @@ -2602,7 +2602,7 @@ static int do_request(zval *this_ptr, xmlDoc *request, char *location, char *act zval exception_object; ZVAL_OBJ(&exception_object, EG(exception)); - msg = zval_get_string(zend_read_property(zend_get_exception_base(&exception_object), &exception_object, "message", sizeof("message")-1, 0, &rv)); + msg = zval_get_string(zend_read_property(zend_get_error(), &exception_object, "message", sizeof("message")-1, 0, &rv)); /* change class */ EG(exception)->ce = soap_fault_class_entry; set_soap_fault(&exception_object, NULL, "Client", msg->val, NULL, NULL, NULL); From 7e18df82a3b109bbe83318efa170a804c8121669 Mon Sep 17 00:00:00 2001 From: Aaron Piotrowski Date: Sun, 17 May 2015 17:31:06 -0500 Subject: [PATCH 06/18] Merge exception formatting changes. --- Zend/zend_exceptions.c | 195 +++++++++++++++++++++-------------------- 1 file changed, 98 insertions(+), 97 deletions(-) diff --git a/Zend/zend_exceptions.c b/Zend/zend_exceptions.c index 9ad221d6959ee..9e053b1118501 100644 --- a/Zend/zend_exceptions.c +++ b/Zend/zend_exceptions.c @@ -30,33 +30,39 @@ #include "zend_dtrace.h" #include "zend_smart_str.h" -static zend_class_entry *base_exception_ce; static zend_class_entry *default_exception_ce; static zend_class_entry *error_exception_ce; -static zend_class_entry *engine_exception_ce; -static zend_class_entry *parse_exception_ce; -static zend_class_entry *type_exception_ce; +static zend_class_entry *error_ce; +static zend_class_entry *parse_error_ce; +static zend_class_entry *type_error_ce; static zend_object_handlers default_exception_handlers; ZEND_API void (*zend_throw_exception_hook)(zval *ex); +static zend_class_entry *zend_get_exception_base(zval *object) +{ + return instanceof_function(Z_OBJCE_P(object), default_exception_ce) ? default_exception_ce : error_ce; +} + void zend_exception_set_previous(zend_object *exception, zend_object *add_previous) { zval tmp, *previous, zv, *pzv, rv; + zend_class_entry *base_ce; if (exception == add_previous || !add_previous || !exception) { return; } ZVAL_OBJ(&tmp, add_previous); - if (!instanceof_function(Z_OBJCE(tmp), base_exception_ce)) { + if (!instanceof_function(Z_OBJCE(tmp), zend_ce_throwable)) { zend_error_noreturn(E_CORE_ERROR, "Cannot set non exception as previous exception"); return; } ZVAL_OBJ(&zv, exception); pzv = &zv; do { - previous = zend_read_property(base_exception_ce, pzv, "previous", sizeof("previous")-1, 1, &rv); + base_ce = zend_get_exception_base(pzv); + previous = zend_read_property(base_ce, pzv, "previous", sizeof("previous")-1, 1, &rv); if (Z_TYPE_P(previous) == IS_NULL) { - zend_update_property(base_exception_ce, pzv, "previous", sizeof("previous")-1, &tmp); + zend_update_property(base_ce, pzv, "previous", sizeof("previous")-1, &tmp); GC_REFCOUNT(add_previous)--; return; } @@ -110,7 +116,7 @@ ZEND_API void zend_throw_exception_internal(zval *exception) /* {{{ */ } } if (!EG(current_execute_data)) { - if (exception && Z_OBJCE_P(exception) == parse_exception_ce) { + if (exception && Z_OBJCE_P(exception) == parse_error_ce) { return; } if(EG(exception)) { @@ -158,6 +164,7 @@ static zend_object *zend_default_exception_new_ex(zend_class_entry *class_type, zval obj; zend_object *object; zval trace; + zend_class_entry *base_ce; Z_OBJ(obj) = object = zend_objects_new(class_type); Z_OBJ_HT(obj) = &default_exception_handlers; @@ -170,15 +177,17 @@ static zend_object *zend_default_exception_new_ex(zend_class_entry *class_type, array_init(&trace); } Z_SET_REFCOUNT(trace, 0); + + base_ce = zend_get_exception_base(&obj); - if (EXPECTED(class_type != parse_exception_ce)) { - zend_update_property_string(base_exception_ce, &obj, "file", sizeof("file")-1, zend_get_executed_filename()); - zend_update_property_long(base_exception_ce, &obj, "line", sizeof("line")-1, zend_get_executed_lineno()); + if (EXPECTED(class_type != parse_error_ce)) { + zend_update_property_string(base_ce, &obj, "file", sizeof("file")-1, zend_get_executed_filename()); + zend_update_property_long(base_ce, &obj, "line", sizeof("line")-1, zend_get_executed_lineno()); } else { - zend_update_property_string(base_exception_ce, &obj, "file", sizeof("file")-1, zend_get_compiled_filename()->val); - zend_update_property_long(base_exception_ce, &obj, "line", sizeof("line")-1, zend_get_compiled_lineno()); + zend_update_property_string(base_ce, &obj, "file", sizeof("file")-1, zend_get_compiled_filename()->val); + zend_update_property_long(base_ce, &obj, "line", sizeof("line")-1, zend_get_compiled_lineno()); } - zend_update_property(base_exception_ce, &obj, "trace", sizeof("trace")-1, &trace); + zend_update_property(base_ce, &obj, "trace", sizeof("trace")-1, &trace); return object; } @@ -212,25 +221,27 @@ ZEND_METHOD(exception, __construct) zend_string *message = NULL; zend_long code = 0; zval *object, *previous = NULL; + zend_class_entry *base_ce; int argc = ZEND_NUM_ARGS(); - if (zend_parse_parameters_ex(ZEND_PARSE_PARAMS_QUIET, argc, "|SlO!", &message, &code, &previous, base_exception_ce) == FAILURE) { + object = getThis(); + base_ce = zend_get_exception_base(object); + + if (zend_parse_parameters_ex(ZEND_PARSE_PARAMS_QUIET, argc, "|SlO!", &message, &code, &previous, base_ce) == FAILURE) { zend_error(E_EXCEPTION | E_ERROR, "Wrong parameters for Exception([string $exception [, long $code [, Exception $previous = NULL]]])"); return; } - object = getThis(); - if (message) { - zend_update_property_str(base_exception_ce, object, "message", sizeof("message")-1, message); + zend_update_property_str(base_ce, object, "message", sizeof("message")-1, message); } if (code) { - zend_update_property_long(base_exception_ce, object, "code", sizeof("code")-1, code); + zend_update_property_long(base_ce, object, "code", sizeof("code")-1, code); } if (previous) { - zend_update_property(base_exception_ce, object, "previous", sizeof("previous")-1, previous); + zend_update_property(base_ce, object, "previous", sizeof("previous")-1, previous); } } /* }}} */ @@ -245,7 +256,7 @@ ZEND_METHOD(error_exception, __construct) int argc = ZEND_NUM_ARGS(); size_t message_len, filename_len; - if (zend_parse_parameters_ex(ZEND_PARSE_PARAMS_QUIET, argc, "|sllslO!", &message, &message_len, &code, &severity, &filename, &filename_len, &lineno, &previous, base_exception_ce) == FAILURE) { + if (zend_parse_parameters_ex(ZEND_PARSE_PARAMS_QUIET, argc, "|sllslO!", &message, &message_len, &code, &severity, &filename, &filename_len, &lineno, &previous, default_exception_ce) == FAILURE) { zend_error(E_EXCEPTION | E_ERROR, "Wrong parameters for ErrorException([string $exception [, long $code, [ long $severity, [ string $filename, [ long $lineno [, Exception $previous = NULL]]]]]])"); return; } @@ -253,25 +264,25 @@ ZEND_METHOD(error_exception, __construct) object = getThis(); if (message) { - zend_update_property_string(base_exception_ce, object, "message", sizeof("message")-1, message); + zend_update_property_string(default_exception_ce, object, "message", sizeof("message")-1, message); } if (code) { - zend_update_property_long(base_exception_ce, object, "code", sizeof("code")-1, code); + zend_update_property_long(default_exception_ce, object, "code", sizeof("code")-1, code); } if (previous) { - zend_update_property(base_exception_ce, object, "previous", sizeof("previous")-1, previous); + zend_update_property(default_exception_ce, object, "previous", sizeof("previous")-1, previous); } - zend_update_property_long(base_exception_ce, object, "severity", sizeof("severity")-1, severity); + zend_update_property_long(error_exception_ce, object, "severity", sizeof("severity")-1, severity); if (argc >= 4) { - zend_update_property_string(base_exception_ce, object, "file", sizeof("file")-1, filename); + zend_update_property_string(default_exception_ce, object, "file", sizeof("file")-1, filename); if (argc < 5) { lineno = 0; /* invalidate lineno */ } - zend_update_property_long(base_exception_ce, object, "line", sizeof("line")-1, lineno); + zend_update_property_long(default_exception_ce, object, "line", sizeof("line")-1, lineno); } } /* }}} */ @@ -282,9 +293,9 @@ ZEND_METHOD(error_exception, __construct) } #define GET_PROPERTY(object, name) \ - zend_read_property(base_exception_ce, (object), name, sizeof(name) - 1, 0, &rv) + zend_read_property(zend_get_exception_base(object), (object), name, sizeof(name) - 1, 0, &rv) #define GET_PROPERTY_SILENT(object, name) \ - zend_read_property(base_exception_ce, (object), name, sizeof(name) - 1, 1, &rv) + zend_read_property(zend_get_exception_base(object), (object), name, sizeof(name) - 1, 1, &rv) /* {{{ proto string Exception::getFile() Get the file in which the exception occurred */ @@ -551,12 +562,17 @@ ZEND_METHOD(exception, getTraceAsString) { zval *trace, *frame, rv; zend_ulong index; + zval *object; + zend_class_entry *base_ce; smart_str str = {0}; uint32_t num = 0; DEFAULT_0_PARAMS; + + object = getThis(); + base_ce = zend_get_exception_base(object); - trace = zend_read_property(base_exception_ce, getThis(), "trace", sizeof("trace")-1, 1, &rv); + trace = zend_read_property(base_ce, getThis(), "trace", sizeof("trace")-1, 1, &rv); if (Z_TYPE_P(trace) != IS_ARRAY) { RETURN_FALSE; } @@ -618,6 +634,7 @@ zend_string *zend_strpprintf(size_t max_len, const char *format, ...) /* {{{ */ ZEND_METHOD(exception, __toString) { zval trace, *exception; + zend_class_entry *base_ce; zend_string *str; zend_fcall_info fci; zval fname, rv; @@ -652,7 +669,7 @@ ZEND_METHOD(exception, __toString) ZVAL_UNDEF(&trace); } - if (Z_OBJCE_P(exception) == type_exception_ce && strstr(message->val, ", called in ")) { + if (Z_OBJCE_P(exception) == type_error_ce && strstr(message->val, ", called in ")) { zend_string *real_message = zend_strpprintf(0, "%s and defined", message->val); zend_string_release(message); message = real_message; @@ -681,9 +698,12 @@ ZEND_METHOD(exception, __toString) } zval_dtor(&fname); + exception = getThis(); + base_ce = zend_get_exception_base(exception); + /* We store the result in the private property string so we can access * the result in uncaught exception handlers without memleaks. */ - zend_update_property_str(base_exception_ce, getThis(), "string", sizeof("string")-1, str); + zend_update_property_str(base_ce, exception, "string", sizeof("string")-1, str); RETURN_STR(str); } @@ -740,66 +760,47 @@ void zend_register_default_exception(void) /* {{{ */ zend_class_entry ce; zend_property_info *prop; - INIT_CLASS_ENTRY(ce, "BaseException", default_exception_functions); - base_exception_ce = zend_register_internal_class(&ce); - base_exception_ce->ce_flags |= ZEND_ACC_EXPLICIT_ABSTRACT_CLASS; - base_exception_ce->create_object = NULL; + INIT_CLASS_ENTRY(ce, "Exception", default_exception_functions); + default_exception_ce = zend_register_internal_class_ex(&ce, NULL); + default_exception_ce->create_object = zend_default_exception_new; + zend_class_implements(default_exception_ce, 1, zend_ce_throwable); + memcpy(&default_exception_handlers, zend_get_std_object_handlers(), sizeof(zend_object_handlers)); default_exception_handlers.clone_obj = NULL; - zend_declare_property_string(base_exception_ce, "message", sizeof("message")-1, "", ZEND_ACC_PROTECTED); - zend_declare_property_string(base_exception_ce, "string", sizeof("string")-1, "", ZEND_ACC_PRIVATE); - zend_declare_property_long(base_exception_ce, "code", sizeof("code")-1, 0, ZEND_ACC_PROTECTED); - zend_declare_property_null(base_exception_ce, "file", sizeof("file")-1, ZEND_ACC_PROTECTED); - zend_declare_property_null(base_exception_ce, "line", sizeof("line")-1, ZEND_ACC_PROTECTED); - zend_declare_property_null(base_exception_ce, "trace", sizeof("trace")-1, ZEND_ACC_PRIVATE); - zend_declare_property_null(base_exception_ce, "previous", sizeof("previous")-1, ZEND_ACC_PRIVATE); - - INIT_CLASS_ENTRY(ce, "Exception", NULL); - default_exception_ce = zend_register_internal_class_ex(&ce, base_exception_ce); - default_exception_ce->create_object = zend_default_exception_new; - - /* A trick, to make visible private properties of BaseException */ - ZEND_HASH_FOREACH_PTR(&default_exception_ce->properties_info, prop) { - if (prop->flags & ZEND_ACC_SHADOW) { - if (prop->name->len == sizeof("\0BaseException\0string")-1) { - prop->flags &= ~ZEND_ACC_SHADOW; - prop->flags |= ZEND_ACC_PRIVATE; - prop->ce = default_exception_ce; - } else if (prop->name->len == sizeof("\0BaseException\0trace")-1) { - prop->flags &= ~ZEND_ACC_SHADOW; - prop->flags |= ZEND_ACC_PRIVATE; - prop->ce = default_exception_ce; - } else if (prop->name->len == sizeof("\0BaseException\0previous")-1) { - prop->flags &= ~ZEND_ACC_SHADOW; - prop->flags |= ZEND_ACC_PRIVATE; - prop->ce = default_exception_ce; - } - } - } ZEND_HASH_FOREACH_END(); + zend_declare_property_string(default_exception_ce, "message", sizeof("message")-1, "", ZEND_ACC_PROTECTED); + zend_declare_property_string(default_exception_ce, "string", sizeof("string")-1, "", ZEND_ACC_PRIVATE); + zend_declare_property_long(default_exception_ce, "code", sizeof("code")-1, 0, ZEND_ACC_PROTECTED); + zend_declare_property_null(default_exception_ce, "file", sizeof("file")-1, ZEND_ACC_PROTECTED); + zend_declare_property_null(default_exception_ce, "line", sizeof("line")-1, ZEND_ACC_PROTECTED); + zend_declare_property_null(default_exception_ce, "trace", sizeof("trace")-1, ZEND_ACC_PRIVATE); + zend_declare_property_null(default_exception_ce, "previous", sizeof("previous")-1, ZEND_ACC_PRIVATE); INIT_CLASS_ENTRY(ce, "ErrorException", error_exception_functions); error_exception_ce = zend_register_internal_class_ex(&ce, default_exception_ce); error_exception_ce->create_object = zend_error_exception_new; zend_declare_property_long(error_exception_ce, "severity", sizeof("severity")-1, E_ERROR, ZEND_ACC_PROTECTED); - INIT_CLASS_ENTRY(ce, "EngineException", NULL); - engine_exception_ce = zend_register_internal_class_ex(&ce, base_exception_ce); - engine_exception_ce->create_object = zend_default_exception_new; + INIT_CLASS_ENTRY(ce, "Error", default_exception_functions); + error_ce = zend_register_internal_class_ex(&ce, NULL); + error_ce->create_object = zend_default_exception_new; + zend_class_implements(error_ce, 1, zend_ce_throwable); - INIT_CLASS_ENTRY(ce, "ParseException", NULL); - parse_exception_ce = zend_register_internal_class_ex(&ce, base_exception_ce); - parse_exception_ce->create_object = zend_default_exception_new; + zend_declare_property_string(error_ce, "message", sizeof("message")-1, "", ZEND_ACC_PROTECTED); + zend_declare_property_string(error_ce, "string", sizeof("string")-1, "", ZEND_ACC_PRIVATE); + zend_declare_property_long(error_ce, "code", sizeof("code")-1, 0, ZEND_ACC_PROTECTED); + zend_declare_property_null(error_ce, "file", sizeof("file")-1, ZEND_ACC_PROTECTED); + zend_declare_property_null(error_ce, "line", sizeof("line")-1, ZEND_ACC_PROTECTED); + zend_declare_property_null(error_ce, "trace", sizeof("trace")-1, ZEND_ACC_PRIVATE); + zend_declare_property_null(error_ce, "previous", sizeof("previous")-1, ZEND_ACC_PRIVATE); - INIT_CLASS_ENTRY(ce, "TypeException", NULL); - type_exception_ce = zend_register_internal_class_ex(&ce, engine_exception_ce); - type_exception_ce->create_object = zend_default_exception_new; -} -/* }}} */ + INIT_CLASS_ENTRY(ce, "ParseError", NULL); + parse_error_ce = zend_register_internal_class_ex(&ce, error_ce); + parse_error_ce->create_object = zend_default_exception_new; -ZEND_API zend_class_entry *zend_exception_get_base(void) /* {{{ */ -{ - return base_exception_ce; + INIT_CLASS_ENTRY(ce, "TypeError", NULL); + type_error_ce = zend_register_internal_class_ex(&ce, error_ce); + type_error_ce->create_object = zend_default_exception_new; } /* }}} */ @@ -815,21 +816,21 @@ ZEND_API zend_class_entry *zend_get_error_exception(void) /* {{{ */ } /* }}} */ -ZEND_API zend_class_entry *zend_get_engine_exception(void) /* {{{ */ +ZEND_API zend_class_entry *zend_get_error(void) /* {{{ */ { - return engine_exception_ce; + return error_ce; } /* }}} */ -ZEND_API zend_class_entry *zend_get_parse_exception(void) /* {{{ */ +ZEND_API zend_class_entry *zend_get_parse_error(void) /* {{{ */ { - return parse_exception_ce; + return parse_error_ce; } /* }}} */ -ZEND_API zend_class_entry *zend_get_type_exception(void) /* {{{ */ +ZEND_API zend_class_entry *zend_get_type_error(void) /* {{{ */ { - return type_exception_ce; + return type_error_ce; } /* }}} */ @@ -839,8 +840,8 @@ ZEND_API zend_object *zend_throw_exception(zend_class_entry *exception_ce, const zval ex; if (exception_ce) { - if (!instanceof_function(exception_ce, base_exception_ce)) { - zend_error(E_NOTICE, "Exceptions must be derived from the Exception base class"); + if (!instanceof_function(exception_ce, zend_ce_throwable)) { + zend_error(E_NOTICE, "Exceptions must implement Throwable"); exception_ce = default_exception_ce; } } else { @@ -850,10 +851,10 @@ ZEND_API zend_object *zend_throw_exception(zend_class_entry *exception_ce, const if (message) { - zend_update_property_string(base_exception_ce, &ex, "message", sizeof("message")-1, message); + zend_update_property_string(exception_ce, &ex, "message", sizeof("message")-1, message); } if (code) { - zend_update_property_long(base_exception_ce, &ex, "code", sizeof("code")-1, code); + zend_update_property_long(exception_ce, &ex, "code", sizeof("code")-1, code); } zend_throw_exception_internal(&ex); @@ -881,7 +882,7 @@ ZEND_API zend_object *zend_throw_error_exception(zend_class_entry *exception_ce, zval ex; zend_object *obj = zend_throw_exception(exception_ce, message, code); ZVAL_OBJ(&ex, obj); - zend_update_property_long(base_exception_ce, &ex, "severity", sizeof("severity")-1, severity); + zend_update_property_long(error_exception_ce, &ex, "severity", sizeof("severity")-1, severity); return obj; } /* }}} */ @@ -914,7 +915,7 @@ ZEND_API void zend_exception_error(zend_object *ex, int severity) /* {{{ */ ZVAL_OBJ(&exception, ex); ce_exception = Z_OBJCE(exception); EG(exception) = NULL; - if (ce_exception == parse_exception_ce) { + if (ce_exception == parse_error_ce) { zend_string *message = zval_get_string(GET_PROPERTY(&exception, "message")); zend_string *file = zval_get_string(GET_PROPERTY_SILENT(&exception, "file")); zend_long line = zval_get_long(GET_PROPERTY_SILENT(&exception, "line")); @@ -924,7 +925,7 @@ ZEND_API void zend_exception_error(zend_object *ex, int severity) /* {{{ */ zend_string_release(file); zend_string_release(message); - } else if (instanceof_function(ce_exception, base_exception_ce)) { + } else if (instanceof_function(ce_exception, default_exception_ce) || instanceof_function(ce_exception, error_ce)) { zval tmp, rv; zend_string *str, *file = NULL; zend_long line = 0; @@ -934,7 +935,7 @@ ZEND_API void zend_exception_error(zend_object *ex, int severity) /* {{{ */ if (Z_TYPE(tmp) != IS_STRING) { zend_error(E_WARNING, "%s::__toString() must return a string", ce_exception->name->val); } else { - zend_update_property_string(base_exception_ce, &exception, "string", sizeof("string")-1, EG(exception) ? ce_exception->name->val : Z_STRVAL(tmp)); + zend_update_property_string(zend_get_exception_base(&exception), &exception, "string", sizeof("string")-1, EG(exception) ? ce_exception->name->val : Z_STRVAL(tmp)); } } zval_ptr_dtor(&tmp); @@ -944,7 +945,7 @@ ZEND_API void zend_exception_error(zend_object *ex, int severity) /* {{{ */ ZVAL_OBJ(&zv, EG(exception)); /* do the best we can to inform about the inner exception */ - if (instanceof_function(ce_exception, base_exception_ce)) { + if (instanceof_function(ce_exception, default_exception_ce) || instanceof_function(ce_exception, error_ce)) { file = zval_get_string(GET_PROPERTY_SILENT(&zv, "file")); line = zval_get_long(GET_PROPERTY_SILENT(&zv, "line")); } @@ -985,8 +986,8 @@ ZEND_API void zend_throw_exception_object(zval *exception) /* {{{ */ exception_ce = Z_OBJCE_P(exception); - if (!exception_ce || !instanceof_function(exception_ce, base_exception_ce)) { - zend_error(E_EXCEPTION | E_ERROR, "Exceptions must be valid objects derived from the Exception base class"); + if (!exception_ce || !instanceof_function(exception_ce, zend_ce_throwable)) { + zend_error(E_EXCEPTION | E_ERROR, "Cannot throw objects that do not implement Throwable"); return; } zend_throw_exception_internal(exception); From e97d5fab35af5c73b0d9614bb2d079c67bf4d508 Mon Sep 17 00:00:00 2001 From: Aaron Piotrowski Date: Sun, 17 May 2015 17:31:43 -0500 Subject: [PATCH 07/18] Update exception names in tests after formatting changes. --- Zend/tests/028.phpt | 2 +- Zend/tests/037.phpt | 2 +- Zend/tests/access_modifiers_010.phpt | 2 +- Zend/tests/add_002.phpt | 4 ++-- Zend/tests/add_003.phpt | 4 ++-- Zend/tests/add_004.phpt | 4 ++-- Zend/tests/add_007.phpt | 4 ++-- Zend/tests/array_type_hint_001.phpt | 2 +- Zend/tests/bug24773.phpt | 2 +- Zend/tests/bug29015.phpt | 2 +- Zend/tests/bug29674.phpt | 2 +- Zend/tests/bug31102.phpt | 2 +- Zend/tests/bug32660.phpt | 2 +- Zend/tests/bug33318.phpt | 2 +- Zend/tests/bug33996.phpt | 2 +- Zend/tests/bug34064.phpt | 2 +- Zend/tests/bug36071.phpt | 2 +- Zend/tests/bug36268.phpt | 2 +- Zend/tests/bug37632.phpt | 2 +- Zend/tests/bug39003.phpt | 2 +- Zend/tests/bug40621.phpt | 2 +- Zend/tests/bug41633_2.phpt | 2 +- Zend/tests/bug41633_3.phpt | 2 +- Zend/tests/bug41813.phpt | 2 +- Zend/tests/bug41919.phpt | 2 +- Zend/tests/bug42802.phpt | 2 +- Zend/tests/bug42817.phpt | 2 +- Zend/tests/bug42818.phpt | 2 +- Zend/tests/bug42819.phpt | 2 +- Zend/tests/bug42937.phpt | 2 +- Zend/tests/bug43332_1.phpt | 2 +- Zend/tests/bug43344_10.phpt | 2 +- Zend/tests/bug43344_11.phpt | 2 +- Zend/tests/bug43344_12.phpt | 2 +- Zend/tests/bug43344_13.phpt | 2 +- Zend/tests/bug43344_2.phpt | 2 +- Zend/tests/bug43344_6.phpt | 2 +- Zend/tests/bug43344_7.phpt | 2 +- Zend/tests/bug43344_8.phpt | 2 +- Zend/tests/bug43344_9.phpt | 2 +- Zend/tests/bug44141.phpt | 2 +- Zend/tests/bug46304.phpt | 2 +- Zend/tests/bug46381.phpt | 2 +- Zend/tests/bug47054.phpt | 2 +- Zend/tests/bug47699.phpt | 2 +- Zend/tests/bug47704.phpt | 2 +- Zend/tests/bug48215_2.phpt | 2 +- Zend/tests/bug48693.phpt | 12 ++++++------ Zend/tests/bug49866.phpt | 2 +- Zend/tests/bug50146.phpt | 2 +- Zend/tests/bug52484.phpt | 2 +- Zend/tests/bug52484_2.phpt | 2 +- Zend/tests/bug52484_3.phpt | 2 +- Zend/tests/bug55705.phpt | 2 +- Zend/tests/bug61025.phpt | 2 +- Zend/tests/bug63111.phpt | 2 +- Zend/tests/bug63173.phpt | 2 +- Zend/tests/bug64720.phpt | 8 ++++---- Zend/tests/bug65784.phpt | 2 +- Zend/tests/bug65911.phpt | 2 +- Zend/tests/bug68446.phpt | 2 +- Zend/tests/bug68652.phpt | 2 +- Zend/tests/call_static_004.phpt | 2 +- Zend/tests/call_static_006.phpt | 2 +- Zend/tests/call_user_func_004.phpt | 2 +- Zend/tests/class_alias_008.phpt | 2 +- Zend/tests/class_alias_016.phpt | 2 +- Zend/tests/class_alias_020.phpt | 2 +- Zend/tests/class_constants_001.phpt | 2 +- Zend/tests/class_name_as_scalar_error_005.phpt | 2 +- Zend/tests/class_name_as_scalar_error_006.phpt | 2 +- Zend/tests/class_name_as_scalar_error_007.phpt | 2 +- Zend/tests/clone_001.phpt | 2 +- Zend/tests/clone_003.phpt | 2 +- Zend/tests/clone_004.phpt | 2 +- Zend/tests/closure_005.phpt | 2 +- Zend/tests/closure_019.phpt | 2 +- Zend/tests/closure_020.phpt | 2 +- Zend/tests/closure_022.phpt | 2 +- Zend/tests/closure_027.phpt | 2 +- Zend/tests/closure_033.phpt | 2 +- Zend/tests/closure_038.phpt | 4 ++-- Zend/tests/closure_039.phpt | 4 ++-- ...nstant_expressions_invalid_offset_type_error.phpt | 2 +- .../constant_expressions_self_referencing_array.phpt | 2 +- Zend/tests/dereference_002.phpt | 2 +- Zend/tests/dereference_010.phpt | 2 +- Zend/tests/div_002.phpt | 4 ++-- Zend/tests/dynamic_call_001.phpt | 2 +- Zend/tests/dynamic_call_002.phpt | 2 +- Zend/tests/dynamic_call_003.phpt | 2 +- Zend/tests/dynamic_call_004.phpt | 2 +- Zend/tests/errmsg_044.phpt | 2 +- Zend/tests/exception_004.phpt | 2 +- Zend/tests/exception_005.phpt | 2 +- Zend/tests/exception_006.phpt | 2 +- Zend/tests/exception_013.phpt | 8 ++++---- Zend/tests/exception_014.phpt | 4 ++-- Zend/tests/exception_015.phpt | 4 ++-- Zend/tests/exception_016.phpt | 4 ++-- Zend/tests/exception_017.phpt | 8 ++++---- Zend/tests/generators/bug63066.phpt | 2 +- Zend/tests/generators/bug65161.phpt | 2 +- Zend/tests/generators/clone.phpt | 2 +- .../errors/generator_instantiate_error.phpt | 2 +- .../errors/resume_running_generator_error.phpt | 4 ++-- .../errors/yield_in_force_closed_finally_error.phpt | 2 +- Zend/tests/generators/throw_not_an_exception.phpt | 2 +- .../tests/generators/yield_from_already_running.phpt | 2 +- Zend/tests/indirect_call_array_001.phpt | 2 +- Zend/tests/indirect_call_array_002.phpt | 2 +- Zend/tests/indirect_method_call_002.phpt | 2 +- Zend/tests/list_005.phpt | 2 +- Zend/tests/list_007.phpt | 2 +- Zend/tests/methods-on-non-objects.phpt | 2 +- Zend/tests/mul_001.phpt | 4 ++-- Zend/tests/not_002.phpt | 4 ++-- Zend/tests/ns_004.phpt | 2 +- Zend/tests/ns_026.phpt | 2 +- Zend/tests/ns_038.phpt | 2 +- Zend/tests/ns_057.phpt | 2 +- Zend/tests/ns_058.phpt | 2 +- Zend/tests/ns_071.phpt | 2 +- Zend/tests/ns_072.phpt | 2 +- Zend/tests/ns_076.phpt | 2 +- Zend/tests/ns_077_1.phpt | 2 +- Zend/tests/ns_077_2.phpt | 2 +- Zend/tests/ns_077_3.phpt | 2 +- Zend/tests/ns_077_4.phpt | 2 +- Zend/tests/ns_077_5.phpt | 2 +- Zend/tests/ns_077_6.phpt | 2 +- Zend/tests/ns_077_7.phpt | 2 +- Zend/tests/ns_077_8.phpt | 2 +- Zend/tests/ns_092.phpt | 2 +- Zend/tests/objects_017.phpt | 2 +- Zend/tests/objects_022.phpt | 2 +- Zend/tests/objects_025.phpt | 2 +- Zend/tests/objects_026.phpt | 2 +- Zend/tests/objects_029.phpt | 2 +- Zend/tests/objects_030.phpt | 2 +- Zend/tests/offset_assign.phpt | 2 +- Zend/tests/offset_object.phpt | 2 +- Zend/tests/parent_class_name_without_parent.phpt | 2 +- Zend/tests/return_types/001.phpt | 2 +- Zend/tests/return_types/002.phpt | 2 +- Zend/tests/return_types/003.phpt | 2 +- Zend/tests/return_types/004.phpt | 2 +- Zend/tests/return_types/005.phpt | 2 +- Zend/tests/return_types/010.phpt | 2 +- Zend/tests/return_types/013.phpt | 2 +- Zend/tests/return_types/rfc001.phpt | 2 +- Zend/tests/return_types/rfc003.phpt | 2 +- Zend/tests/str_offset_002.phpt | 6 +++--- Zend/tests/sub_001.phpt | 4 ++-- Zend/tests/traits/bug60173.phpt | 2 +- Zend/tests/traits/bugs/alias01.phpt | 2 +- Zend/tests/traits/error_007.phpt | 2 +- Zend/tests/traits/error_012.phpt | 2 +- Zend/tests/traits/language008a.phpt | 2 +- Zend/tests/traits/language008b.phpt | 2 +- .../typehints/explicit_weak_include_strict.phpt | 2 +- .../typehints/scalar_constant_defaults_error.phpt | 2 +- Zend/tests/typehints/strict_call_weak.phpt | 2 +- Zend/tests/typehints/strict_call_weak_explicit.phpt | 2 +- Zend/tests/typehints/weak_include_strict.phpt | 2 +- Zend/tests/use_const/no_global_fallback.phpt | 2 +- Zend/tests/use_function/no_global_fallback.phpt | 2 +- Zend/tests/use_function/no_global_fallback2.phpt | 2 +- .../varSyntax/method_call_on_string_literal.phpt | 2 +- Zend/tests/varSyntax/tempDimFetchByRefError.phpt | 2 +- Zend/tests/varSyntax/tempPropFetchByRefError.phpt | 2 +- Zend/tests/variadic/typehint_error.phpt | 2 +- ext/date/tests/014.phpt | 2 +- ext/dom/tests/DOMDocument_saveHTMLFile_error2.phpt | 2 +- ext/dom/tests/DOMDocument_saveHTML_error2.phpt | 2 +- ext/dom/tests/DOMDocument_validate_error2.phpt | 2 +- ext/dom/tests/regsiter_node_class.phpt | 2 +- ext/intl/tests/breakiter___construct.phpt | 2 +- ext/intl/tests/calendar_add_error.phpt | 2 +- ext/intl/tests/calendar_clear_error.phpt | 2 +- ext/intl/tests/calendar_fieldDifference_error.phpt | 2 +- ext/intl/tests/calendar_getDayOfWeekType_error.phpt | 2 +- ext/intl/tests/calendar_getErrorCode_error.phpt | 2 +- ext/intl/tests/calendar_getErrorMessage_error.phpt | 2 +- ext/intl/tests/calendar_getFirstDayOfWeek_error.phpt | 2 +- ext/intl/tests/calendar_getLocale_error.phpt | 2 +- .../calendar_getMinimalDaysInFirstWeek_error.phpt | 2 +- ...ndar_getSkipped_RepeatedWallTimeOption_error.phpt | 2 +- ext/intl/tests/calendar_getTimeZone_error.phpt | 2 +- ext/intl/tests/calendar_getTime_error.phpt | 2 +- ext/intl/tests/calendar_getType_error.phpt | 2 +- .../tests/calendar_getWeekendTransition_error.phpt | 2 +- ext/intl/tests/calendar_inDaylightTime_error.phpt | 2 +- ext/intl/tests/calendar_isLenient_error.phpt | 2 +- ext/intl/tests/calendar_isSet_error.phpt | 2 +- ext/intl/tests/calendar_isWeekend_error.phpt | 2 +- ext/intl/tests/calendar_roll_error.phpt | 2 +- ext/intl/tests/calendar_setFirstDayOfWeek_error.phpt | 2 +- ext/intl/tests/calendar_setLenient_error.phpt | 2 +- .../calendar_setMinimalDaysInFirstWeek_error.phpt | 2 +- ...ndar_setSkipped_RepeatedWallTimeOption_error.phpt | 2 +- ext/intl/tests/calendar_setTime_error.phpt | 2 +- ext/intl/tests/calendar_set_error.phpt | 2 +- ext/intl/tests/calendar_toDateTime_error.phpt | 2 +- .../gregoriancalendar_getGregorianChange_error.phpt | 2 +- .../tests/gregoriancalendar_isLeapYear_error.phpt | 2 +- .../gregoriancalendar_setGregorianChange_error.phpt | 2 +- ext/intl/tests/timezone_getCanonicalID_error.phpt | 2 +- ext/intl/tests/timezone_getDSTSavings_error.phpt | 2 +- ext/intl/tests/timezone_getDisplayName_error.phpt | 2 +- ext/intl/tests/timezone_getErrorCode_error.phpt | 2 +- ext/intl/tests/timezone_getErrorMessage_error.phpt | 2 +- ext/intl/tests/timezone_getID_error.phpt | 2 +- ext/intl/tests/timezone_getOffset_error.phpt | 2 +- ext/intl/tests/timezone_getRawOffset_error.phpt | 2 +- ext/intl/tests/timezone_toDateTimeZone_error.phpt | 2 +- ext/intl/tests/timezone_useDaylightTime_error.phpt | 2 +- .../tests/transliterator_create_inverse_error.phpt | 2 +- .../tests/transliterator_get_error_code_error.phpt | 2 +- .../transliterator_get_error_message_error.phpt | 2 +- ext/mysqli/tests/bug33491.phpt | 2 +- ext/mysqli/tests/bug38003.phpt | 2 +- ext/mysqli/tests/mysqli_driver_unclonable.phpt | 2 +- .../tests/mysqli_fetch_object_no_constructor.phpt | 2 +- ext/mysqli/tests/mysqli_result_unclonable.phpt | 2 +- ext/mysqli/tests/mysqli_stmt_unclonable.phpt | 2 +- ext/mysqli/tests/mysqli_unclonable.phpt | 2 +- ext/pdo/tests/bug47769.phpt | 2 +- ext/pdo/tests/pdo_025.phpt | 2 +- ext/pdo/tests/pdo_037.phpt | 2 +- ext/pdo_mysql/tests/bug_37445.phpt | 2 +- .../tests/pdo_mysql_attr_statement_class.phpt | 2 +- .../tests/pdo_mysql_prepare_native_clear_error.phpt | 2 +- .../tests/pdo_mysql_prepare_native_mixed_style.phpt | 2 +- ext/pdo_mysql/tests/pdo_mysql_stmt_errorcode.phpt | 2 +- ext/pdo_mysql/tests/pdo_mysql_stmt_multiquery.phpt | 2 +- ext/phar/tests/cache_list/frontcontroller29.phpt | 2 +- ext/phar/tests/frontcontroller29.phpt | 2 +- .../tests/ReflectionClass_CannotClone_basic.phpt | 2 +- .../tests/ReflectionClass_getName_error1.phpt | 2 +- .../tests/ReflectionClass_isCloneable_001.phpt | 2 +- .../tests/ReflectionClass_isIterateable_001.phpt | 2 +- .../tests/ReflectionClass_newInstanceArgs_002.phpt | 2 +- .../tests/ReflectionObject_getName_error1.phpt | 2 +- ext/reflection/tests/bug64007.phpt | 2 +- ext/session/tests/bug60634_error_1.phpt | 2 +- ext/session/tests/bug60634_error_3.phpt | 2 +- ext/session/tests/bug60634_error_5.phpt | 2 +- ext/simplexml/tests/SimpleXMLElement_xpath.phpt | 2 +- ext/spl/tests/arrayObject_setFlags_basic2.phpt | 2 +- ext/spl/tests/bug48023.phpt | 2 +- ext/spl/tests/bug49972.phpt | 2 +- ext/spl/tests/iterator_035.phpt | 2 +- ext/spl/tests/iterator_count.phpt | 2 +- ext/spl/tests/iterator_to_array.phpt | 2 +- .../spl_iterator_recursive_getiterator_error.phpt | 2 +- ext/standard/tests/array/arsort_object1.phpt | 2 +- ext/standard/tests/array/arsort_object2.phpt | 2 +- ext/standard/tests/file/bug38450_3.phpt | 2 +- ext/standard/tests/general_functions/bug47857.phpt | 2 +- ext/standard/tests/serialize/bug69152.phpt | 2 +- ext/tidy/tests/035.phpt | 2 +- ext/xmlreader/tests/bug51936.phpt | 2 +- sapi/cgi/tests/004.phpt | 2 +- sapi/cli/tests/008.phpt | 2 +- sapi/cli/tests/php_cli_server_015.phpt | 2 +- tests/classes/abstract.phpt | 2 +- tests/classes/abstract_class.phpt | 2 +- tests/classes/abstract_inherit.phpt | 2 +- tests/classes/abstract_user_call.phpt | 2 +- tests/classes/array_access_012.phpt | 2 +- tests/classes/autoload_009.phpt | 2 +- tests/classes/autoload_021.phpt | 2 +- tests/classes/bug27504.phpt | 2 +- tests/classes/class_abstract.phpt | 2 +- tests/classes/constants_basic_001.phpt | 2 +- tests/classes/ctor_visibility.phpt | 2 +- tests/classes/destructor_visibility_001.phpt | 2 +- tests/classes/factory_and_singleton_003.phpt | 2 +- tests/classes/factory_and_singleton_004.phpt | 2 +- tests/classes/factory_and_singleton_005.phpt | 2 +- tests/classes/factory_and_singleton_006.phpt | 2 +- tests/classes/factory_and_singleton_007.phpt | 2 +- tests/classes/factory_and_singleton_008.phpt | 2 +- tests/classes/interface_instantiate.phpt | 2 +- tests/classes/interfaces_003.phpt | 2 +- tests/classes/private_001.phpt | 2 +- tests/classes/private_002.phpt | 2 +- tests/classes/private_003.phpt | 2 +- tests/classes/private_003b.phpt | 2 +- tests/classes/private_004.phpt | 2 +- tests/classes/private_004b.phpt | 2 +- tests/classes/private_005.phpt | 2 +- tests/classes/private_005b.phpt | 2 +- tests/classes/private_redeclare.phpt | 2 +- tests/classes/property_recreate_private.phpt | 2 +- tests/classes/property_recreate_protected.phpt | 2 +- tests/classes/protected_001.phpt | 2 +- tests/classes/protected_001b.phpt | 2 +- tests/classes/protected_002.phpt | 2 +- tests/classes/static_properties_003_error1.phpt | 2 +- tests/classes/static_properties_003_error2.phpt | 2 +- tests/classes/static_properties_003_error3.phpt | 2 +- tests/classes/static_properties_003_error4.phpt | 4 ++-- .../classes/static_properties_undeclared_assign.phpt | 2 +- .../static_properties_undeclared_assignInc.phpt | 2 +- .../static_properties_undeclared_assignRef.phpt | 2 +- tests/classes/static_properties_undeclared_inc.phpt | 2 +- tests/classes/static_properties_undeclared_read.phpt | 2 +- tests/classes/type_hinting_001.phpt | 2 +- tests/classes/type_hinting_002.phpt | 2 +- tests/classes/type_hinting_003.phpt | 2 +- tests/lang/041.phpt | 2 +- tests/lang/042.phpt | 2 +- tests/lang/043.phpt | 2 +- tests/lang/044.phpt | 2 +- tests/lang/bug24658.phpt | 2 +- tests/lang/catchable_error_001.phpt | 2 +- tests/lang/foreachLoopIterator.002.phpt | 2 +- tests/lang/type_hints_001.phpt | 2 +- 320 files changed, 351 insertions(+), 351 deletions(-) diff --git a/Zend/tests/028.phpt b/Zend/tests/028.phpt index 7152c99195080..24dafffc689b8 100644 --- a/Zend/tests/028.phpt +++ b/Zend/tests/028.phpt @@ -20,7 +20,7 @@ bool(true) Notice: Undefined offset: 2 in %s on line %d -Fatal error: Uncaught EngineException: Function name must be a string in %s:%d +Fatal error: Uncaught Error: Function name must be a string in %s:%d Stack trace: #0 {main} thrown in %s on line %d diff --git a/Zend/tests/037.phpt b/Zend/tests/037.phpt index 12ae69b8c609f..ef70310e6d4a3 100644 --- a/Zend/tests/037.phpt +++ b/Zend/tests/037.phpt @@ -16,7 +16,7 @@ var_dump($x::$x); --EXPECTF-- int(1) -Fatal error: Uncaught EngineException: Access to undeclared static property: Closure::$x in %s:%d +Fatal error: Uncaught Error: Access to undeclared static property: Closure::$x in %s:%d Stack trace: #0 {main} thrown in %s on line %d diff --git a/Zend/tests/access_modifiers_010.phpt b/Zend/tests/access_modifiers_010.phpt index fe774fefbcf20..342ef522af8b1 100644 --- a/Zend/tests/access_modifiers_010.phpt +++ b/Zend/tests/access_modifiers_010.phpt @@ -28,7 +28,7 @@ new c; ?> --EXPECTF-- -Fatal error: Uncaught EngineException: Call to private method d::test2() from context 'a' in %s:%d +Fatal error: Uncaught Error: Call to private method d::test2() from context 'a' in %s:%d Stack trace: #0 %s(%d): a->test() #1 %s(%d): c->__construct() diff --git a/Zend/tests/add_002.phpt b/Zend/tests/add_002.phpt index 8868fca2e2924..4d804fe3e8df7 100644 --- a/Zend/tests/add_002.phpt +++ b/Zend/tests/add_002.phpt @@ -10,7 +10,7 @@ $o->prop = "value"; try { var_dump($a + $o); -} catch (EngineException $e) { +} catch (Error $e) { echo "\nException: " . $e->getMessage() . "\n"; } @@ -26,7 +26,7 @@ Exception: Unsupported operand types Notice: Object of class stdClass could not be converted to int in %s on line %d -Fatal error: Uncaught EngineException: Unsupported operand types in %s:%d +Fatal error: Uncaught Error: Unsupported operand types in %s:%d Stack trace: #0 {main} thrown in %s on line %d diff --git a/Zend/tests/add_003.phpt b/Zend/tests/add_003.phpt index 7a9391038c201..a3705479e254c 100644 --- a/Zend/tests/add_003.phpt +++ b/Zend/tests/add_003.phpt @@ -10,7 +10,7 @@ $o->prop = "value"; try { var_dump($o + $a); -} catch (EngineException $e) { +} catch (Error $e) { echo "\nException: " . $e->getMessage() . "\n"; } @@ -26,7 +26,7 @@ Exception: Unsupported operand types Notice: Object of class stdClass could not be converted to int in %s on line %d -Fatal error: Uncaught EngineException: Unsupported operand types in %s:%d +Fatal error: Uncaught Error: Unsupported operand types in %s:%d Stack trace: #0 {main} thrown in %s on line %d diff --git a/Zend/tests/add_004.phpt b/Zend/tests/add_004.phpt index cf19f2fc1d52d..026d2494dc9a7 100644 --- a/Zend/tests/add_004.phpt +++ b/Zend/tests/add_004.phpt @@ -7,7 +7,7 @@ $a = array(1,2,3); try { var_dump($a + 5); -} catch (EngineException $e) { +} catch (Error $e) { echo "\nException: " . $e->getMessage() . "\n"; } @@ -19,7 +19,7 @@ echo "Done\n"; --EXPECTF-- Exception: Unsupported operand types -Fatal error: Uncaught EngineException: Unsupported operand types in %s:%d +Fatal error: Uncaught Error: Unsupported operand types in %s:%d Stack trace: #0 {main} thrown in %s on line %d diff --git a/Zend/tests/add_007.phpt b/Zend/tests/add_007.phpt index 2616196c90898..66f5405706030 100644 --- a/Zend/tests/add_007.phpt +++ b/Zend/tests/add_007.phpt @@ -9,7 +9,7 @@ $s1 = "some string"; try { var_dump($a + $s1); -} catch (EngineException $e) { +} catch (Error $e) { echo "\nException: " . $e->getMessage() . "\n"; } @@ -21,7 +21,7 @@ echo "Done\n"; --EXPECTF-- Exception: Unsupported operand types -Fatal error: Uncaught EngineException: Unsupported operand types in %s:%d +Fatal error: Uncaught Error: Unsupported operand types in %s:%d Stack trace: #0 {main} thrown in %s on line %d diff --git a/Zend/tests/array_type_hint_001.phpt b/Zend/tests/array_type_hint_001.phpt index f5cc76de1d2dd..474ffa8e59e0a 100644 --- a/Zend/tests/array_type_hint_001.phpt +++ b/Zend/tests/array_type_hint_001.phpt @@ -12,7 +12,7 @@ foo(123); --EXPECTF-- 3 -Fatal error: Uncaught TypeException: Argument 1 passed to foo() must be of the type array, integer given, called in %sarray_type_hint_001.php on line 7 and defined in %sarray_type_hint_001.php:2 +Fatal error: Uncaught TypeError: Argument 1 passed to foo() must be of the type array, integer given, called in %sarray_type_hint_001.php on line 7 and defined in %sarray_type_hint_001.php:2 Stack trace: #0 %s(%d): foo() #1 {main} diff --git a/Zend/tests/bug24773.phpt b/Zend/tests/bug24773.phpt index d2b1db398502a..4116492807151 100644 --- a/Zend/tests/bug24773.phpt +++ b/Zend/tests/bug24773.phpt @@ -6,7 +6,7 @@ Bug #24773 (unset() of integers treated as arrays causes a crash) unset($array["lvl1"]["lvl2"]["b"]); ?> --EXPECTF-- -Fatal error: Uncaught EngineException: Cannot use string offset as an array in %s:%d +Fatal error: Uncaught Error: Cannot use string offset as an array in %s:%d Stack trace: #0 {main} thrown in %s on line %d diff --git a/Zend/tests/bug29015.phpt b/Zend/tests/bug29015.phpt index 2b116383ff4dd..a36ed923f3290 100644 --- a/Zend/tests/bug29015.phpt +++ b/Zend/tests/bug29015.phpt @@ -8,7 +8,7 @@ $a->$x = "string('')"; var_dump($a); ?> --EXPECTF-- -Fatal error: Uncaught EngineException: Cannot access empty property in %sbug29015.php:4 +Fatal error: Uncaught Error: Cannot access empty property in %sbug29015.php:4 Stack trace: #0 {main} thrown in %sbug29015.php on line 4 diff --git a/Zend/tests/bug29674.phpt b/Zend/tests/bug29674.phpt index 7aa7ba1ffc576..39bc302463066 100644 --- a/Zend/tests/bug29674.phpt +++ b/Zend/tests/bug29674.phpt @@ -38,7 +38,7 @@ NULL ===CHILD=== string(4) "Base" -Fatal error: Uncaught EngineException: Cannot access private property ChildClass::$private_child in %sbug29674.php:%d +Fatal error: Uncaught Error: Cannot access private property ChildClass::$private_child in %sbug29674.php:%d Stack trace: #0 %s(%d): BaseClass->printVars() #1 {main} diff --git a/Zend/tests/bug31102.phpt b/Zend/tests/bug31102.phpt index 9937d2ad0280f..5de01f7282671 100644 --- a/Zend/tests/bug31102.phpt +++ b/Zend/tests/bug31102.phpt @@ -45,7 +45,7 @@ __autoload(Test2,2) Caught: __autoload __autoload(Test3,3) -Fatal error: Uncaught EngineException: Class 'Test3' not found in %sbug31102.php(%d) : eval()'d code:1 +Fatal error: Uncaught Error: Class 'Test3' not found in %sbug31102.php(%d) : eval()'d code:1 Stack trace: #0 %s(%d): eval() #1 {main} diff --git a/Zend/tests/bug32660.phpt b/Zend/tests/bug32660.phpt index e241eed44bc26..8651d491f856f 100644 --- a/Zend/tests/bug32660.phpt +++ b/Zend/tests/bug32660.phpt @@ -36,7 +36,7 @@ A Object Notice: Indirect modification of overloaded property A::$whatever has no effect in %sbug32660.php on line 23 -Fatal error: Uncaught EngineException: Cannot assign by reference to overloaded object in %sbug32660.php:23 +Fatal error: Uncaught Error: Cannot assign by reference to overloaded object in %sbug32660.php:23 Stack trace: #0 {main} thrown in %sbug32660.php on line 23 diff --git a/Zend/tests/bug33318.phpt b/Zend/tests/bug33318.phpt index 24752cdccf46f..74ac9552bc0b3 100644 --- a/Zend/tests/bug33318.phpt +++ b/Zend/tests/bug33318.phpt @@ -5,7 +5,7 @@ Bug #33318 (throw 1; results in Invalid opcode 108/1/8) throw 1; ?> --EXPECTF-- -Fatal error: Uncaught EngineException: Can only throw objects in %sbug33318.php:2 +Fatal error: Uncaught Error: Can only throw objects in %sbug33318.php:2 Stack trace: #0 {main} thrown in %sbug33318.php on line 2 \ No newline at end of file diff --git a/Zend/tests/bug33996.phpt b/Zend/tests/bug33996.phpt index 66ea0822a2914..c399ee99756c8 100644 --- a/Zend/tests/bug33996.phpt +++ b/Zend/tests/bug33996.phpt @@ -26,7 +26,7 @@ FooTest(new Foo()); --EXPECTF-- Warning: Missing argument 1 for NormalTest(), called in %sbug33996.php on line %d and defined in %sbug33996.php on line %d Hi! -Fatal error: Uncaught TypeException: Argument 1 passed to FooTest() must be an instance of Foo, none given, called in %sbug33996.php on line %d and defined in %sbug33996.php:%d +Fatal error: Uncaught TypeError: Argument 1 passed to FooTest() must be an instance of Foo, none given, called in %sbug33996.php on line %d and defined in %sbug33996.php:%d Stack trace: #0 %s(%d): FooTest() #1 {main} diff --git a/Zend/tests/bug34064.phpt b/Zend/tests/bug34064.phpt index 46bbaf8751190..1b61f347750fb 100644 --- a/Zend/tests/bug34064.phpt +++ b/Zend/tests/bug34064.phpt @@ -31,7 +31,7 @@ array(1) { string(2) "ok" } -Fatal error: Uncaught EngineException: Cannot use [] for reading in %sbug34064.php:18 +Fatal error: Uncaught Error: Cannot use [] for reading in %sbug34064.php:18 Stack trace: #0 %s(%d): XmlTest->run() #1 {main} diff --git a/Zend/tests/bug36071.phpt b/Zend/tests/bug36071.phpt index 08a0ddd94bafa..31179ea3f9c67 100644 --- a/Zend/tests/bug36071.phpt +++ b/Zend/tests/bug36071.phpt @@ -8,7 +8,7 @@ $a = clone 0; $a[0]->b = 0; ?> --EXPECTF-- -Fatal error: Uncaught EngineException: __clone method called on non-object in %sbug36071.php:2 +Fatal error: Uncaught Error: __clone method called on non-object in %sbug36071.php:2 Stack trace: #0 {main} thrown in %sbug36071.php on line 2 \ No newline at end of file diff --git a/Zend/tests/bug36268.phpt b/Zend/tests/bug36268.phpt index 42f4b5076fee1..8c93186c73cc5 100644 --- a/Zend/tests/bug36268.phpt +++ b/Zend/tests/bug36268.phpt @@ -11,7 +11,7 @@ $x = new Foo(); bar(); ?> --EXPECTF-- -Fatal error: Uncaught EngineException: Call to undefined function bar() in %sbug36268.php:8 +Fatal error: Uncaught Error: Call to undefined function bar() in %sbug36268.php:8 Stack trace: #0 {main} thrown in %sbug36268.php on line 8 diff --git a/Zend/tests/bug37632.phpt b/Zend/tests/bug37632.phpt index d97aba0f4ce7e..a5a782508c253 100644 --- a/Zend/tests/bug37632.phpt +++ b/Zend/tests/bug37632.phpt @@ -132,7 +132,7 @@ B2::doTest C2::test B4::doTest -Fatal error: Uncaught EngineException: Call to protected C4::__construct() from context 'B4' in %sbug37632.php:%d +Fatal error: Uncaught Error: Call to protected C4::__construct() from context 'B4' in %sbug37632.php:%d Stack trace: #0 %s(%d): B4::doTest() #1 {main} diff --git a/Zend/tests/bug39003.phpt b/Zend/tests/bug39003.phpt index 80ed7c897f823..f4f9e4d9b6531 100644 --- a/Zend/tests/bug39003.phpt +++ b/Zend/tests/bug39003.phpt @@ -21,7 +21,7 @@ test($obj); echo "Done\n"; ?> --EXPECTF-- -Fatal error: Uncaught TypeException: Argument 1 passed to test() must be an instance of OtherClassName, instance of ClassName given, called in %s on line %d and defined in %s:%d +Fatal error: Uncaught TypeError: Argument 1 passed to test() must be an instance of OtherClassName, instance of ClassName given, called in %s on line %d and defined in %s:%d Stack trace: #0 %s(%d): test() #1 {main} diff --git a/Zend/tests/bug40621.phpt b/Zend/tests/bug40621.phpt index ef1e6c9383343..5ed16bd173fe3 100644 --- a/Zend/tests/bug40621.phpt +++ b/Zend/tests/bug40621.phpt @@ -17,7 +17,7 @@ echo "Done\n"; --EXPECTF-- Deprecated: Non-static method Foo::get() should not be called statically in %s on line %d -Fatal error: Uncaught EngineException: Non-static method Foo::__construct() cannot be called statically in %s:%d +Fatal error: Uncaught Error: Non-static method Foo::__construct() cannot be called statically in %s:%d Stack trace: #0 %s(%d): Foo::get() #1 {main} diff --git a/Zend/tests/bug41633_2.phpt b/Zend/tests/bug41633_2.phpt index 2df51af924ec1..df6705645f59d 100644 --- a/Zend/tests/bug41633_2.phpt +++ b/Zend/tests/bug41633_2.phpt @@ -8,7 +8,7 @@ class Foo { echo Foo::A."\n"; ?> --EXPECTF-- -Fatal error: Uncaught EngineException: Undefined class constant 'self::B' in %sbug41633_2.php:5 +Fatal error: Uncaught Error: Undefined class constant 'self::B' in %sbug41633_2.php:5 Stack trace: #0 {main} thrown in %sbug41633_2.php on line 5 diff --git a/Zend/tests/bug41633_3.phpt b/Zend/tests/bug41633_3.phpt index beb32e8b8eafd..dd4b75c9d9350 100644 --- a/Zend/tests/bug41633_3.phpt +++ b/Zend/tests/bug41633_3.phpt @@ -9,7 +9,7 @@ class Foo { echo Foo::A; ?> --EXPECTF-- -Fatal error: Uncaught EngineException: Cannot declare self-referencing constant 'Foo::B' in %sbug41633_3.php:%d +Fatal error: Uncaught Error: Cannot declare self-referencing constant 'Foo::B' in %sbug41633_3.php:%d Stack trace: #0 {main} thrown in %sbug41633_3.php on line %d diff --git a/Zend/tests/bug41813.phpt b/Zend/tests/bug41813.phpt index 4a38e062e2743..0bb693075a463 100644 --- a/Zend/tests/bug41813.phpt +++ b/Zend/tests/bug41813.phpt @@ -9,7 +9,7 @@ $foo[0]->bar = "xyz"; echo "Done\n"; ?> --EXPECTF-- -Fatal error: Uncaught EngineException: Cannot use string offset as an array in %s:%d +Fatal error: Uncaught Error: Cannot use string offset as an array in %s:%d Stack trace: #0 {main} thrown in %s on line %d diff --git a/Zend/tests/bug41919.phpt b/Zend/tests/bug41919.phpt index cb6a87e83ceda..2af13acdc9477 100644 --- a/Zend/tests/bug41919.phpt +++ b/Zend/tests/bug41919.phpt @@ -8,7 +8,7 @@ $foo[3]->bar[1] = "bang"; echo "ok\n"; ?> --EXPECTF-- -Fatal error: Uncaught EngineException: Cannot use string offset as an object in %sbug41919.php:%d +Fatal error: Uncaught Error: Cannot use string offset as an object in %sbug41919.php:%d Stack trace: #0 {main} thrown in %sbug41919.php on line %d diff --git a/Zend/tests/bug42802.phpt b/Zend/tests/bug42802.phpt index abbac47c9ec30..6dad5feccb7da 100644 --- a/Zend/tests/bug42802.phpt +++ b/Zend/tests/bug42802.phpt @@ -37,7 +37,7 @@ ok ok ok -Fatal error: Uncaught TypeException: Argument 1 passed to foo\test5() must be an instance of bar, instance of foo\bar given, called in %sbug42802.php on line %d and defined in %sbug42802.php:%d +Fatal error: Uncaught TypeError: Argument 1 passed to foo\test5() must be an instance of bar, instance of foo\bar given, called in %sbug42802.php on line %d and defined in %sbug42802.php:%d Stack trace: #0 %s(%d): foo\test5() #1 {main} diff --git a/Zend/tests/bug42817.phpt b/Zend/tests/bug42817.phpt index 0c2c53116934b..a681d861d0c8f 100644 --- a/Zend/tests/bug42817.phpt +++ b/Zend/tests/bug42817.phpt @@ -6,7 +6,7 @@ $a = clone(null); array_push($a->b, $c); ?> --EXPECTF-- -Fatal error: Uncaught EngineException: __clone method called on non-object in %sbug42817.php:2 +Fatal error: Uncaught Error: __clone method called on non-object in %sbug42817.php:2 Stack trace: #0 {main} thrown in %sbug42817.php on line 2 diff --git a/Zend/tests/bug42818.phpt b/Zend/tests/bug42818.phpt index 11d9895be9b8f..4ebe9cc35d267 100644 --- a/Zend/tests/bug42818.phpt +++ b/Zend/tests/bug42818.phpt @@ -5,7 +5,7 @@ Bug #42818 ($foo = clone(array()); leaks memory) $foo = clone(array()); ?> --EXPECTF-- -Fatal error: Uncaught EngineException: __clone method called on non-object in %sbug42818.php:2 +Fatal error: Uncaught Error: __clone method called on non-object in %sbug42818.php:2 Stack trace: #0 {main} thrown in %sbug42818.php on line 2 diff --git a/Zend/tests/bug42819.phpt b/Zend/tests/bug42819.phpt index 84a3bfb640996..4630dc29b5fde 100644 --- a/Zend/tests/bug42819.phpt +++ b/Zend/tests/bug42819.phpt @@ -299,7 +299,7 @@ Array [1] => 1 ) -Fatal error: Uncaught EngineException: Undefined constant 'foo\foo\unknown' in %sbug42819.php:%d +Fatal error: Uncaught Error: Undefined constant 'foo\foo\unknown' in %sbug42819.php:%d Stack trace: #0 %s(%d): foo\oops() #1 {main} diff --git a/Zend/tests/bug42937.phpt b/Zend/tests/bug42937.phpt index 9d13a79d9344c..2ade186b9cc98 100644 --- a/Zend/tests/bug42937.phpt +++ b/Zend/tests/bug42937.phpt @@ -39,7 +39,7 @@ test3 test4 test5 -Fatal error: Uncaught EngineException: Call to undefined method C::test6() in %sbug42937.php:21 +Fatal error: Uncaught Error: Call to undefined method C::test6() in %sbug42937.php:21 Stack trace: #0 %s(%d): B->test() #1 {main} diff --git a/Zend/tests/bug43332_1.phpt b/Zend/tests/bug43332_1.phpt index 6506f9c591f25..5fe734cfea970 100644 --- a/Zend/tests/bug43332_1.phpt +++ b/Zend/tests/bug43332_1.phpt @@ -12,7 +12,7 @@ $foo = new foo; $foo->bar($foo); // Ok! $foo->bar(new \stdclass); // Error, ok! --EXPECTF-- -Fatal error: Uncaught TypeException: Argument 1 passed to foobar\foo::bar() must be an instance of foobar\foo, instance of stdClass given, called in %sbug43332_1.php on line 10 and defined in %sbug43332_1.php:5 +Fatal error: Uncaught TypeError: Argument 1 passed to foobar\foo::bar() must be an instance of foobar\foo, instance of stdClass given, called in %sbug43332_1.php on line 10 and defined in %sbug43332_1.php:5 Stack trace: #0 %s(%d): foobar\foo->bar() #1 {main} diff --git a/Zend/tests/bug43344_10.phpt b/Zend/tests/bug43344_10.phpt index 23bb8e9ad6990..4916b039e1cc8 100644 --- a/Zend/tests/bug43344_10.phpt +++ b/Zend/tests/bug43344_10.phpt @@ -5,7 +5,7 @@ Bug #43344.10 (Wrong error message for undefined namespace constant) echo namespace\bar."\n"; ?> --EXPECTF-- -Fatal error: Uncaught EngineException: Undefined constant 'bar' in %sbug43344_10.php:%d +Fatal error: Uncaught Error: Undefined constant 'bar' in %sbug43344_10.php:%d Stack trace: #0 {main} thrown in %sbug43344_10.php on line %d diff --git a/Zend/tests/bug43344_11.phpt b/Zend/tests/bug43344_11.phpt index 9529e7e5821b7..27c3160f5af5e 100644 --- a/Zend/tests/bug43344_11.phpt +++ b/Zend/tests/bug43344_11.phpt @@ -8,7 +8,7 @@ function f($a=namespace\bar) { echo f()."\n"; ?> --EXPECTF-- -Fatal error: Uncaught EngineException: Undefined constant 'bar' in %sbug43344_11.php:%d +Fatal error: Uncaught Error: Undefined constant 'bar' in %sbug43344_11.php:%d Stack trace: #0 %s(%d): f() #1 {main} diff --git a/Zend/tests/bug43344_12.phpt b/Zend/tests/bug43344_12.phpt index b487421757724..71031f5819f1a 100644 --- a/Zend/tests/bug43344_12.phpt +++ b/Zend/tests/bug43344_12.phpt @@ -8,7 +8,7 @@ function f($a=array(namespace\bar)) { echo f()."\n"; ?> --EXPECTF-- -Fatal error: Uncaught EngineException: Undefined constant 'bar' in %sbug43344_12.php:%d +Fatal error: Uncaught Error: Undefined constant 'bar' in %sbug43344_12.php:%d Stack trace: #0 %s(%d): f() #1 {main} diff --git a/Zend/tests/bug43344_13.phpt b/Zend/tests/bug43344_13.phpt index aab7d93da269a..bdce5a8a758ac 100644 --- a/Zend/tests/bug43344_13.phpt +++ b/Zend/tests/bug43344_13.phpt @@ -9,7 +9,7 @@ function f($a=array(namespace\bar=>0)) { echo f()."\n"; ?> --EXPECTF-- -Fatal error: Uncaught EngineException: Undefined constant 'bar' in %sbug43344_13.php:%d +Fatal error: Uncaught Error: Undefined constant 'bar' in %sbug43344_13.php:%d Stack trace: #0 %s(%d): f() #1 {main} diff --git a/Zend/tests/bug43344_2.phpt b/Zend/tests/bug43344_2.phpt index 6b74e76a0b793..081f339a41e95 100644 --- a/Zend/tests/bug43344_2.phpt +++ b/Zend/tests/bug43344_2.phpt @@ -6,7 +6,7 @@ namespace Foo; echo Foo::bar."\n"; ?> --EXPECTF-- -Fatal error: Uncaught EngineException: Class 'Foo\Foo' not found in %sbug43344_2.php:%d +Fatal error: Uncaught Error: Class 'Foo\Foo' not found in %sbug43344_2.php:%d Stack trace: #0 {main} thrown in %sbug43344_2.php on line %d diff --git a/Zend/tests/bug43344_6.phpt b/Zend/tests/bug43344_6.phpt index c5c848f8089b4..45aac8281f7f5 100644 --- a/Zend/tests/bug43344_6.phpt +++ b/Zend/tests/bug43344_6.phpt @@ -6,7 +6,7 @@ namespace Foo; echo namespace\bar."\n"; ?> --EXPECTF-- -Fatal error: Uncaught EngineException: Undefined constant 'Foo\bar' in %sbug43344_6.php:%d +Fatal error: Uncaught Error: Undefined constant 'Foo\bar' in %sbug43344_6.php:%d Stack trace: #0 {main} thrown in %sbug43344_6.php on line %d diff --git a/Zend/tests/bug43344_7.phpt b/Zend/tests/bug43344_7.phpt index 6d536c1dd2cba..dfab0cad904a9 100644 --- a/Zend/tests/bug43344_7.phpt +++ b/Zend/tests/bug43344_7.phpt @@ -9,7 +9,7 @@ function f($a=namespace\bar) { echo f()."\n"; ?> --EXPECTF-- -Fatal error: Uncaught EngineException: Undefined constant 'Foo\bar' in %sbug43344_7.php:%d +Fatal error: Uncaught Error: Undefined constant 'Foo\bar' in %sbug43344_7.php:%d Stack trace: #0 %s(%d): Foo\f() #1 {main} diff --git a/Zend/tests/bug43344_8.phpt b/Zend/tests/bug43344_8.phpt index 7f621f9cbfbe6..b1e6f61a54c79 100644 --- a/Zend/tests/bug43344_8.phpt +++ b/Zend/tests/bug43344_8.phpt @@ -9,7 +9,7 @@ function f($a=array(namespace\bar)) { echo f()."\n"; ?> --EXPECTF-- -Fatal error: Uncaught EngineException: Undefined constant 'Foo\bar' in %sbug43344_8.php:%d +Fatal error: Uncaught Error: Undefined constant 'Foo\bar' in %sbug43344_8.php:%d Stack trace: #0 %s(%d): Foo\f() #1 {main} diff --git a/Zend/tests/bug43344_9.phpt b/Zend/tests/bug43344_9.phpt index a6117385b6e99..7f7f2df38ff0a 100644 --- a/Zend/tests/bug43344_9.phpt +++ b/Zend/tests/bug43344_9.phpt @@ -10,7 +10,7 @@ function f($a=array(namespace\bar=>0)) { echo f()."\n"; ?> --EXPECTF-- -Fatal error: Uncaught EngineException: Undefined constant 'Foo\bar' in %sbug43344_9.php:%d +Fatal error: Uncaught Error: Undefined constant 'Foo\bar' in %sbug43344_9.php:%d Stack trace: #0 %s(%d): Foo\f() #1 {main} diff --git a/Zend/tests/bug44141.phpt b/Zend/tests/bug44141.phpt index 021b4810f4766..5ea737e46a026 100644 --- a/Zend/tests/bug44141.phpt +++ b/Zend/tests/bug44141.phpt @@ -22,7 +22,7 @@ class Y extends X $y = Y::cheat(5); echo $y->x, PHP_EOL; --EXPECTF-- -Fatal error: Uncaught EngineException: Call to private X::__construct() from context 'Y' in %sbug44141.php:15 +Fatal error: Uncaught Error: Call to private X::__construct() from context 'Y' in %sbug44141.php:15 Stack trace: #0 %s(%d): Y::cheat(5) #1 {main} diff --git a/Zend/tests/bug46304.phpt b/Zend/tests/bug46304.phpt index 19374047cf846..e2e031116d2e1 100644 --- a/Zend/tests/bug46304.phpt +++ b/Zend/tests/bug46304.phpt @@ -62,7 +62,7 @@ value6 value6 value6 -Fatal error: Uncaught EngineException: Undefined constant 'NS1\ns2\coNSt1' in %sbug46304.php:%d +Fatal error: Uncaught Error: Undefined constant 'NS1\ns2\coNSt1' in %sbug46304.php:%d Stack trace: #0 {main} thrown in %sbug46304.php on line %d diff --git a/Zend/tests/bug46381.phpt b/Zend/tests/bug46381.phpt index f86b5f07d5a45..bfe11cdf280f9 100644 --- a/Zend/tests/bug46381.phpt +++ b/Zend/tests/bug46381.phpt @@ -14,7 +14,7 @@ $test->method(); echo "Done\n"; ?> --EXPECTF-- -Fatal error: Uncaught EngineException: Non-static method ArrayIterator::current() cannot be called statically in %s:%d +Fatal error: Uncaught Error: Non-static method ArrayIterator::current() cannot be called statically in %s:%d Stack trace: #0 %s(%d): test->method() #1 {main} diff --git a/Zend/tests/bug47054.phpt b/Zend/tests/bug47054.phpt index 7433baba24ad3..9e89c2c20808b 100644 --- a/Zend/tests/bug47054.phpt +++ b/Zend/tests/bug47054.phpt @@ -36,7 +36,7 @@ Warning: get_called_class() called from outside a class in %s on line %d Deprecated: Non-static method D::m() should not be called statically in %s on line %d -Fatal error: Uncaught EngineException: Using $this when not in object context in %s:%d +Fatal error: Uncaught Error: Using $this when not in object context in %s:%d Stack trace: #0 %s(%d): D::m() #1 {main} diff --git a/Zend/tests/bug47699.phpt b/Zend/tests/bug47699.phpt index 8cb3280bcffbe..6d4871bc2dd4d 100644 --- a/Zend/tests/bug47699.phpt +++ b/Zend/tests/bug47699.phpt @@ -15,7 +15,7 @@ new X(); ?> --EXPECTF-- BB -Fatal error: Uncaught EngineException: Class 'X' not found in %sbug47699.php:%d +Fatal error: Uncaught Error: Class 'X' not found in %sbug47699.php:%d Stack trace: #0 {main} thrown in %sbug47699.php on line %d diff --git a/Zend/tests/bug47704.phpt b/Zend/tests/bug47704.phpt index 306443f8bbaa2..4fdaba80923e7 100644 --- a/Zend/tests/bug47704.phpt +++ b/Zend/tests/bug47704.phpt @@ -6,7 +6,7 @@ $s = "abd"; $s[0]->a += 1; ?> --EXPECTF-- -Fatal error: Uncaught EngineException: Cannot use string offset as an object in %sbug47704.php:%d +Fatal error: Uncaught Error: Cannot use string offset as an object in %sbug47704.php:%d Stack trace: #0 {main} thrown in %sbug47704.php on line %d diff --git a/Zend/tests/bug48215_2.phpt b/Zend/tests/bug48215_2.phpt index 034b3f1a4cb1c..458e68144f846 100644 --- a/Zend/tests/bug48215_2.phpt +++ b/Zend/tests/bug48215_2.phpt @@ -16,7 +16,7 @@ $c = new c(); ?> ===DONE=== --EXPECTF-- -Fatal error: Uncaught EngineException: Call to undefined method b::b() in %s:%d +Fatal error: Uncaught Error: Call to undefined method b::b() in %s:%d Stack trace: #0 %s(%d): c->__construct() #1 {main} diff --git a/Zend/tests/bug48693.phpt b/Zend/tests/bug48693.phpt index c4fbb4f29792d..41e0d822747cf 100644 --- a/Zend/tests/bug48693.phpt +++ b/Zend/tests/bug48693.phpt @@ -5,22 +5,22 @@ Bug #48693 (Double declaration of __lambda_func when lambda wrongly formatted) try { $x = create_function('', 'return 1; }'); -} catch (ParseException $e) { +} catch (ParseError $e) { echo "$e\n\n"; } try { $y = create_function('', 'function a() { }; return 2;'); -} catch (ParseException $e) { +} catch (ParseError $e) { echo "$e\n\n"; } try { $z = create_function('', '{'); -} catch (ParseException $e) { +} catch (ParseError $e) { echo "$e\n\n"; } try { $w = create_function('', 'return 3;'); -} catch (ParseException $e) { +} catch (ParseError $e) { echo "$e\n\n"; } @@ -31,12 +31,12 @@ var_dump( ?> --EXPECTF-- -ParseException: syntax error, unexpected '}', expecting end of file in %sbug48693.php(4) : runtime-created function:1 +ParseError: syntax error, unexpected '}', expecting end of file in %sbug48693.php(4) : runtime-created function:1 Stack trace: #0 %sbug48693.php(4): create_function('', 'return 1; }') #1 {main} -ParseException: syntax error, unexpected end of file in %sbug48693.php(14) : runtime-created function:1 +ParseError: syntax error, unexpected end of file in %sbug48693.php(14) : runtime-created function:1 Stack trace: #0 %sbug48693.php(14): create_function('', '{') #1 {main} diff --git a/Zend/tests/bug49866.phpt b/Zend/tests/bug49866.phpt index 956367f693c72..3d96a59cd51b4 100644 --- a/Zend/tests/bug49866.phpt +++ b/Zend/tests/bug49866.phpt @@ -7,7 +7,7 @@ $b = &$a[1]; $b = "f"; echo $a; --EXPECTF-- -Fatal error: Uncaught EngineException: Cannot create references to/from string offsets nor overloaded objects in %sbug49866.php:3 +Fatal error: Uncaught Error: Cannot create references to/from string offsets nor overloaded objects in %sbug49866.php:3 Stack trace: #0 {main} thrown in %sbug49866.php on line 3 diff --git a/Zend/tests/bug50146.phpt b/Zend/tests/bug50146.phpt index ffd07edbd331a..0ef9048b0613b 100644 --- a/Zend/tests/bug50146.phpt +++ b/Zend/tests/bug50146.phpt @@ -17,7 +17,7 @@ var_dump(isset($obj->a)); bool(false) bool(false) -Fatal error: Uncaught EngineException: Closure object cannot have properties in %s:%d +Fatal error: Uncaught Error: Closure object cannot have properties in %s:%d Stack trace: #0 {main} thrown in %s on line %d diff --git a/Zend/tests/bug52484.phpt b/Zend/tests/bug52484.phpt index 6000418a29dee..053529614dc67 100644 --- a/Zend/tests/bug52484.phpt +++ b/Zend/tests/bug52484.phpt @@ -16,7 +16,7 @@ unset($a->$prop); ?> --EXPECTF-- -Fatal error: Uncaught EngineException: Cannot access empty property in %s:%d +Fatal error: Uncaught Error: Cannot access empty property in %s:%d Stack trace: #0 %s(%d): A->__unset('') #1 {main} diff --git a/Zend/tests/bug52484_2.phpt b/Zend/tests/bug52484_2.phpt index 5181a425f042d..6bb927535ceaa 100644 --- a/Zend/tests/bug52484_2.phpt +++ b/Zend/tests/bug52484_2.phpt @@ -16,7 +16,7 @@ $a->$prop = 2; ?> --EXPECTF-- -Fatal error: Uncaught EngineException: Cannot access empty property in %s:%d +Fatal error: Uncaught Error: Cannot access empty property in %s:%d Stack trace: #0 %s(%d): A->__set('', 2) #1 {main} diff --git a/Zend/tests/bug52484_3.phpt b/Zend/tests/bug52484_3.phpt index b7646ab047f25..af32bc9be7a6a 100644 --- a/Zend/tests/bug52484_3.phpt +++ b/Zend/tests/bug52484_3.phpt @@ -16,7 +16,7 @@ var_dump($a->$prop); ?> --EXPECTF-- -Fatal error: Uncaught EngineException: Cannot access empty property in %s:%d +Fatal error: Uncaught Error: Cannot access empty property in %s:%d Stack trace: #0 %s(%d): A->__get('') #1 {main} diff --git a/Zend/tests/bug55705.phpt b/Zend/tests/bug55705.phpt index 4b3e9413db6a5..f051bca6dcbf4 100644 --- a/Zend/tests/bug55705.phpt +++ b/Zend/tests/bug55705.phpt @@ -6,7 +6,7 @@ function f(callable $c) {} f(); ?> --EXPECTF-- -Fatal error: Uncaught TypeException: Argument 1 passed to f() must be callable, none given, called in %s on line 3 and defined in %s:%d +Fatal error: Uncaught TypeError: Argument 1 passed to f() must be callable, none given, called in %s on line 3 and defined in %s:%d Stack trace: #0 %s(%d): f() #1 {main} diff --git a/Zend/tests/bug61025.phpt b/Zend/tests/bug61025.phpt index 4b06d7f70448f..f6731535fb2a3 100644 --- a/Zend/tests/bug61025.phpt +++ b/Zend/tests/bug61025.phpt @@ -24,7 +24,7 @@ Warning: The magic method __invoke() must have public visibility and cannot be s Warning: The magic method __invoke() must have public visibility and cannot be static in %sbug61025.php on line %d Bar -Fatal error: Uncaught EngineException: Call to private method Bar::__invoke() from context '' in %sbug61025.php:%d +Fatal error: Uncaught Error: Call to private method Bar::__invoke() from context '' in %sbug61025.php:%d Stack trace: #0 {main} thrown in %sbug61025.php on line %d diff --git a/Zend/tests/bug63111.phpt b/Zend/tests/bug63111.phpt index 38d6fafefc231..3ac4618aeaa1f 100644 --- a/Zend/tests/bug63111.phpt +++ b/Zend/tests/bug63111.phpt @@ -31,7 +31,7 @@ bool(true) bool(true) ok -Fatal error: Uncaught EngineException: Cannot call abstract method Foo::bar() in %sbug63111.php:20 +Fatal error: Uncaught Error: Cannot call abstract method Foo::bar() in %sbug63111.php:20 Stack trace: #0 {main} thrown in %sbug63111.php on line 20 diff --git a/Zend/tests/bug63173.phpt b/Zend/tests/bug63173.phpt index af2611fc04964..f6d76d8148837 100644 --- a/Zend/tests/bug63173.phpt +++ b/Zend/tests/bug63173.phpt @@ -9,7 +9,7 @@ $callback(); ?> --EXPECTF-- -Fatal error: Uncaught EngineException: Array callback has to contain indices 0 and 1 in %s:%d +Fatal error: Uncaught Error: Array callback has to contain indices 0 and 1 in %s:%d Stack trace: #0 {main} thrown in %s on line %d diff --git a/Zend/tests/bug64720.phpt b/Zend/tests/bug64720.phpt index 20fceff7fd55d..45dee3e8c46b4 100644 --- a/Zend/tests/bug64720.phpt +++ b/Zend/tests/bug64720.phpt @@ -22,7 +22,7 @@ class Foo { } } -class Error { +class ErrorTest { private $trace; public function __construct() { $this->trace = debug_backtrace(1); @@ -32,11 +32,11 @@ class Error { class Bar { public function __destruct() { Stat::getInstance(); - new Error(); + new ErrorTest(); } public function test() { - new Error(); + new ErrorTest(); } } @@ -45,7 +45,7 @@ $bar = new Bar(); $bar->test(); ?> --EXPECTF-- -Fatal error: Uncaught EngineException: Access to undeclared static property: Stat::$requests in %sbug64720.php:12 +Fatal error: Uncaught Error: Access to undeclared static property: Stat::$requests in %sbug64720.php:12 Stack trace: #0 [internal function]: Stat->__destruct() #1 {main} diff --git a/Zend/tests/bug65784.phpt b/Zend/tests/bug65784.phpt index 8b9f7dfc75aca..c079b3d2822b2 100644 --- a/Zend/tests/bug65784.phpt +++ b/Zend/tests/bug65784.phpt @@ -57,7 +57,7 @@ $bar = foo3(); string(9) "not catch" NULL -Fatal error: Uncaught EngineException: Class 'NotExists' not found in %sbug65784.php:%d +Fatal error: Uncaught Error: Class 'NotExists' not found in %sbug65784.php:%d Stack trace: #0 %s(%d): foo3() #1 {main} diff --git a/Zend/tests/bug65911.phpt b/Zend/tests/bug65911.phpt index 4f3a613834328..753c8c6c7d813 100644 --- a/Zend/tests/bug65911.phpt +++ b/Zend/tests/bug65911.phpt @@ -17,7 +17,7 @@ $obj = new B(); $obj->go(); ?> --EXPECTF-- -Fatal error: Uncaught EngineException: Access to undeclared static property: A::$this in %s:%d +Fatal error: Uncaught Error: Access to undeclared static property: A::$this in %s:%d Stack trace: #0 %s(%d): B->go() #1 {main} diff --git a/Zend/tests/bug68446.phpt b/Zend/tests/bug68446.phpt index 6a7f9148109b7..2dad15d411e5a 100644 --- a/Zend/tests/bug68446.phpt +++ b/Zend/tests/bug68446.phpt @@ -32,7 +32,7 @@ array(1) { int(1) } -Fatal error: Uncaught TypeException: Argument 1 passed to a() must be of the type array, null given, called in %s on line %d and defined in %s:%d +Fatal error: Uncaught TypeError: Argument 1 passed to a() must be of the type array, null given, called in %s on line %d and defined in %s:%d Stack trace: #0 %s(%d): a() #1 {main} diff --git a/Zend/tests/bug68652.phpt b/Zend/tests/bug68652.phpt index f0a66ceb600b0..e86312ba63a49 100644 --- a/Zend/tests/bug68652.phpt +++ b/Zend/tests/bug68652.phpt @@ -36,7 +36,7 @@ class Bar { $foo = new Foo(); ?> --EXPECTF-- -Fatal error: Uncaught EngineException: Access to undeclared static property: Bar::$instance in %sbug68652.php:%d +Fatal error: Uncaught Error: Access to undeclared static property: Bar::$instance in %sbug68652.php:%d Stack trace: #0 %s(%d): Bar::getInstance() #1 [internal function]: Foo->__destruct() diff --git a/Zend/tests/call_static_004.phpt b/Zend/tests/call_static_004.phpt index 022f4701bafa7..427c12fc960cf 100644 --- a/Zend/tests/call_static_004.phpt +++ b/Zend/tests/call_static_004.phpt @@ -18,7 +18,7 @@ foo::$a(); --EXPECTF-- string(3) "AaA" -Fatal error: Uncaught EngineException: Function name must be a string in %s:%d +Fatal error: Uncaught Error: Function name must be a string in %s:%d Stack trace: #0 {main} thrown in %s on line %d diff --git a/Zend/tests/call_static_006.phpt b/Zend/tests/call_static_006.phpt index 2f55d71cc0066..2887afa3556b5 100644 --- a/Zend/tests/call_static_006.phpt +++ b/Zend/tests/call_static_006.phpt @@ -27,7 +27,7 @@ ok Deprecated: Non-static method foo::aa() should not be called statically in %s on line %d ok -Fatal error: Uncaught EngineException: Cannot call constructor in %s:%d +Fatal error: Uncaught Error: Cannot call constructor in %s:%d Stack trace: #0 {main} thrown in %s on line %d diff --git a/Zend/tests/call_user_func_004.phpt b/Zend/tests/call_user_func_004.phpt index 6b5efcb6df4fa..7a2c4b8ffd83b 100644 --- a/Zend/tests/call_user_func_004.phpt +++ b/Zend/tests/call_user_func_004.phpt @@ -15,7 +15,7 @@ call_user_func(array('foo', 'teste')); --EXPECTF-- Deprecated: %son-static method foo::teste() should not be called statically in %s on line %d -Fatal error: Uncaught EngineException: Using $this when not in object context in %s:%d +Fatal error: Uncaught Error: Using $this when not in object context in %s:%d Stack trace: #0 %s(%d): foo::teste() #1 {main} diff --git a/Zend/tests/class_alias_008.phpt b/Zend/tests/class_alias_008.phpt index df2b4b95eab3f..ab2aa2dcdaac4 100644 --- a/Zend/tests/class_alias_008.phpt +++ b/Zend/tests/class_alias_008.phpt @@ -13,7 +13,7 @@ new $a; ?> --EXPECTF-- -Fatal error: Uncaught EngineException: Cannot instantiate abstract class foo in %s:%d +Fatal error: Uncaught Error: Cannot instantiate abstract class foo in %s:%d Stack trace: #0 {main} thrown in %s on line %d diff --git a/Zend/tests/class_alias_016.phpt b/Zend/tests/class_alias_016.phpt index 5ae6b64479330..1d2b6752a4606 100644 --- a/Zend/tests/class_alias_016.phpt +++ b/Zend/tests/class_alias_016.phpt @@ -18,7 +18,7 @@ var_dump(new foo); object(foo\bar)#%d (0) { } -Fatal error: Uncaught EngineException: Class 'foo\foo' not found in %s:%d +Fatal error: Uncaught Error: Class 'foo\foo' not found in %s:%d Stack trace: #0 {main} thrown in %s on line %d diff --git a/Zend/tests/class_alias_020.phpt b/Zend/tests/class_alias_020.phpt index 861f9287933f2..c7ba609f511ff 100644 --- a/Zend/tests/class_alias_020.phpt +++ b/Zend/tests/class_alias_020.phpt @@ -30,7 +30,7 @@ object(foo\foo)#1 (0) { object(foo\bar\foo)#2 (0) { } -Fatal error: Uncaught EngineException: Class 'foo\bar' not found in %s:%d +Fatal error: Uncaught Error: Class 'foo\bar' not found in %s:%d Stack trace: #0 {main} thrown in %s on line %d diff --git a/Zend/tests/class_constants_001.phpt b/Zend/tests/class_constants_001.phpt index d7afc22e64e70..664ac35698824 100644 --- a/Zend/tests/class_constants_001.phpt +++ b/Zend/tests/class_constants_001.phpt @@ -19,7 +19,7 @@ echo "Done\n"; string(6) "string" int(1) -Fatal error: Uncaught EngineException: Undefined class constant 'val3' in %s:%d +Fatal error: Uncaught Error: Undefined class constant 'val3' in %s:%d Stack trace: #0 {main} thrown in %s on line %d diff --git a/Zend/tests/class_name_as_scalar_error_005.phpt b/Zend/tests/class_name_as_scalar_error_005.phpt index 71eb9b84afc07..cbfaf108e2907 100644 --- a/Zend/tests/class_name_as_scalar_error_005.phpt +++ b/Zend/tests/class_name_as_scalar_error_005.phpt @@ -7,7 +7,7 @@ $x = static::class; ?> --EXPECTF-- -Fatal error: Uncaught EngineException: Cannot use "static" when no class scope is active in %s:3 +Fatal error: Uncaught Error: Cannot use "static" when no class scope is active in %s:3 Stack trace: #0 {main} thrown in %s on line 3 diff --git a/Zend/tests/class_name_as_scalar_error_006.phpt b/Zend/tests/class_name_as_scalar_error_006.phpt index 15f1ec347eeb1..185e9f6be15b1 100644 --- a/Zend/tests/class_name_as_scalar_error_006.phpt +++ b/Zend/tests/class_name_as_scalar_error_006.phpt @@ -7,7 +7,7 @@ $x = parent::class; ?> --EXPECTF-- -Fatal error: Uncaught EngineException: Cannot use "parent" when no class scope is active in %s:3 +Fatal error: Uncaught Error: Cannot use "parent" when no class scope is active in %s:3 Stack trace: #0 {main} thrown in %s on line 3 diff --git a/Zend/tests/class_name_as_scalar_error_007.phpt b/Zend/tests/class_name_as_scalar_error_007.phpt index 01241f42263a8..22099f6104fa7 100644 --- a/Zend/tests/class_name_as_scalar_error_007.phpt +++ b/Zend/tests/class_name_as_scalar_error_007.phpt @@ -7,7 +7,7 @@ var_dump(self::class); ?> --EXPECTF-- -Fatal error: Uncaught EngineException: Cannot use "self" when no class scope is active in %s:3 +Fatal error: Uncaught Error: Cannot use "self" when no class scope is active in %s:3 Stack trace: #0 {main} thrown in %s on line 3 diff --git a/Zend/tests/clone_001.phpt b/Zend/tests/clone_001.phpt index 8109aa6422887..87024c3cd5614 100644 --- a/Zend/tests/clone_001.phpt +++ b/Zend/tests/clone_001.phpt @@ -7,7 +7,7 @@ $a = clone array(); ?> --EXPECTF-- -Fatal error: Uncaught EngineException: __clone method called on non-object in %s:%d +Fatal error: Uncaught Error: __clone method called on non-object in %s:%d Stack trace: #0 {main} thrown in %s on line %d diff --git a/Zend/tests/clone_003.phpt b/Zend/tests/clone_003.phpt index b3adc2b09fd77..2dd376cf65c1d 100644 --- a/Zend/tests/clone_003.phpt +++ b/Zend/tests/clone_003.phpt @@ -9,7 +9,7 @@ $a = clone $b; --EXPECTF-- Notice: Undefined variable: b in %s on line %d -Fatal error: Uncaught EngineException: __clone method called on non-object in %s:%d +Fatal error: Uncaught Error: __clone method called on non-object in %s:%d Stack trace: #0 {main} thrown in %s on line %d diff --git a/Zend/tests/clone_004.phpt b/Zend/tests/clone_004.phpt index e24795ec0aa91..68ebd9da38570 100644 --- a/Zend/tests/clone_004.phpt +++ b/Zend/tests/clone_004.phpt @@ -17,7 +17,7 @@ $a = clone $c->b[1]; ?> --EXPECTF-- -Fatal error: Uncaught EngineException: Cannot use object of type foo as array in %s:%d +Fatal error: Uncaught Error: Cannot use object of type foo as array in %s:%d Stack trace: #0 {main} thrown in %s on line %d diff --git a/Zend/tests/closure_005.phpt b/Zend/tests/closure_005.phpt index 72535b466dafc..b9eb79eafdafc 100644 --- a/Zend/tests/closure_005.phpt +++ b/Zend/tests/closure_005.phpt @@ -71,7 +71,7 @@ echo "Done\n"; 7 Destroyed -Fatal error: Uncaught EngineException: Using $this when not in object context in %sclosure_005.php:28 +Fatal error: Uncaught Error: Using $this when not in object context in %sclosure_005.php:28 Stack trace: #0 %s(%d): A::{closure}() #1 {main} diff --git a/Zend/tests/closure_019.phpt b/Zend/tests/closure_019.phpt index 5505fd2937295..c173108623874 100644 --- a/Zend/tests/closure_019.phpt +++ b/Zend/tests/closure_019.phpt @@ -26,7 +26,7 @@ int(9) Notice: Only variable references should be returned by reference in %sclosure_019.php on line 4 int(81) -Fatal error: Uncaught EngineException: Cannot pass parameter 1 by reference in %s:%d +Fatal error: Uncaught Error: Cannot pass parameter 1 by reference in %s:%d Stack trace: #0 %s(%d): test() #1 {main} diff --git a/Zend/tests/closure_020.phpt b/Zend/tests/closure_020.phpt index a13d4a63c64e3..3e019aaa423c4 100644 --- a/Zend/tests/closure_020.phpt +++ b/Zend/tests/closure_020.phpt @@ -40,7 +40,7 @@ object(foo)#%d (2) { bool(true) bool(true) -Fatal error: Uncaught EngineException: Cannot access private property foo::$test in %s:%d +Fatal error: Uncaught Error: Cannot access private property foo::$test in %s:%d Stack trace: #0 {main} thrown in %s on line %d diff --git a/Zend/tests/closure_022.phpt b/Zend/tests/closure_022.phpt index 1d48e6683e7fd..b1ffebc0b4407 100644 --- a/Zend/tests/closure_022.phpt +++ b/Zend/tests/closure_022.phpt @@ -8,7 +8,7 @@ $foo = function() use ($a) { $foo->a = 1; ?> --EXPECTF-- -Fatal error: Uncaught EngineException: Closure object cannot have properties in %sclosure_022.php:5 +Fatal error: Uncaught Error: Closure object cannot have properties in %sclosure_022.php:5 Stack trace: #0 {main} thrown in %sclosure_022.php on line 5 diff --git a/Zend/tests/closure_027.phpt b/Zend/tests/closure_027.phpt index 7024a93c55722..a56b78013ce05 100644 --- a/Zend/tests/closure_027.phpt +++ b/Zend/tests/closure_027.phpt @@ -28,7 +28,7 @@ Notice: Undefined variable: y in %s on line %d Warning: Missing argument 1 for {closure}(), called in %s on line %d and defined in %s on line %d NULL -Fatal error: Uncaught TypeException: Argument 1 passed to test() must be an instance of Closure, instance of stdClass given, called in %s on line %d and defined in %s:%d +Fatal error: Uncaught TypeError: Argument 1 passed to test() must be an instance of Closure, instance of stdClass given, called in %s on line %d and defined in %s:%d Stack trace: #0 %s(%d): test() #1 {main} diff --git a/Zend/tests/closure_033.phpt b/Zend/tests/closure_033.phpt index 4e445721ea963..d92716aaccec9 100644 --- a/Zend/tests/closure_033.phpt +++ b/Zend/tests/closure_033.phpt @@ -25,7 +25,7 @@ $o->func(); --EXPECTF-- Test::{closure}() -Fatal error: Uncaught EngineException: Call to private method Test::func() from context '' in %sclosure_033.php:%d +Fatal error: Uncaught Error: Call to private method Test::func() from context '' in %sclosure_033.php:%d Stack trace: #0 {main} thrown in %sclosure_033.php on line %d diff --git a/Zend/tests/closure_038.phpt b/Zend/tests/closure_038.phpt index f3bcd831a9c8f..6d659be9104d7 100644 --- a/Zend/tests/closure_038.phpt +++ b/Zend/tests/closure_038.phpt @@ -55,12 +55,12 @@ Testing with scope as string int(23) int(24) -Fatal error: Uncaught EngineException: Cannot access private property B::$x in %s:%d +Fatal error: Uncaught Error: Cannot access private property B::$x in %s:%d Stack trace: #0 %s(%d): Closure->{closure}() #1 {main} -Next EngineException: Cannot access private property B::$x in %s:%d +Next Error: Cannot access private property B::$x in %s:%d Stack trace: #0 %s(%d): Closure->{closure}() #1 {main} diff --git a/Zend/tests/closure_039.phpt b/Zend/tests/closure_039.phpt index 2afd920105245..5de432459ff97 100644 --- a/Zend/tests/closure_039.phpt +++ b/Zend/tests/closure_039.phpt @@ -55,12 +55,12 @@ Testing with scope as string int(23) int(24) -Fatal error: Uncaught EngineException: Cannot access private property B::$x in %s:%d +Fatal error: Uncaught Error: Cannot access private property B::$x in %s:%d Stack trace: #0 %s(%d): Closure->{closure}() #1 {main} -Next EngineException: Cannot access private property B::$x in %s:%d +Next Error: Cannot access private property B::$x in %s:%d Stack trace: #0 %s(%d): Closure->{closure}() #1 {main} diff --git a/Zend/tests/constant_expressions_invalid_offset_type_error.phpt b/Zend/tests/constant_expressions_invalid_offset_type_error.phpt index 5cee0a0bfe702..52d2194e2617c 100644 --- a/Zend/tests/constant_expressions_invalid_offset_type_error.phpt +++ b/Zend/tests/constant_expressions_invalid_offset_type_error.phpt @@ -8,7 +8,7 @@ const C2 = [C1, [] => 1]; ?> --EXPECTF-- -Fatal error: Uncaught EngineException: Illegal offset type in %s:%d +Fatal error: Uncaught Error: Illegal offset type in %s:%d Stack trace: #0 {main} thrown in %s on line %d diff --git a/Zend/tests/constant_expressions_self_referencing_array.phpt b/Zend/tests/constant_expressions_self_referencing_array.phpt index fa14af2f289c3..63f2b20ef590d 100644 --- a/Zend/tests/constant_expressions_self_referencing_array.phpt +++ b/Zend/tests/constant_expressions_self_referencing_array.phpt @@ -9,7 +9,7 @@ class A { var_dump(A::FOO); ?> --EXPECTF-- -Fatal error: Uncaught EngineException: Cannot declare self-referencing constant 'self::FOO' in %s:%d +Fatal error: Uncaught Error: Cannot declare self-referencing constant 'self::FOO' in %s:%d Stack trace: #0 {main} thrown in %s on line %d diff --git a/Zend/tests/dereference_002.phpt b/Zend/tests/dereference_002.phpt index c206e70b3ed36..d16e1bb483037 100644 --- a/Zend/tests/dereference_002.phpt +++ b/Zend/tests/dereference_002.phpt @@ -76,7 +76,7 @@ NULL Notice: Undefined offset: 3 in %s on line %d -Fatal error: Uncaught EngineException: Call to a member function bar() on null in %s:%d +Fatal error: Uncaught Error: Call to a member function bar() on null in %s:%d Stack trace: #0 {main} thrown in %s on line %d diff --git a/Zend/tests/dereference_010.phpt b/Zend/tests/dereference_010.phpt index ec62e5614ebf0..981fe3116082e 100644 --- a/Zend/tests/dereference_010.phpt +++ b/Zend/tests/dereference_010.phpt @@ -24,7 +24,7 @@ var_dump(b()[1]); NULL NULL -Fatal error: Uncaught EngineException: Cannot use object of type stdClass as array in %s:%d +Fatal error: Uncaught Error: Cannot use object of type stdClass as array in %s:%d Stack trace: #0 {main} thrown in %s on line %d diff --git a/Zend/tests/div_002.phpt b/Zend/tests/div_002.phpt index 34f377e2291ff..bf5d512a651cf 100644 --- a/Zend/tests/div_002.phpt +++ b/Zend/tests/div_002.phpt @@ -8,7 +8,7 @@ $b = array(1); try { var_dump($a / $b); -} catch (EngineException $e) { +} catch (Error $e) { echo "\nException: " . $e->getMessage() . "\n"; } @@ -20,7 +20,7 @@ echo "Done\n"; --EXPECTF-- Exception: Unsupported operand types -Fatal error: Uncaught EngineException: Unsupported operand types in %s:%d +Fatal error: Uncaught Error: Unsupported operand types in %s:%d Stack trace: #0 {main} thrown in %s on line %d diff --git a/Zend/tests/dynamic_call_001.phpt b/Zend/tests/dynamic_call_001.phpt index c3c92e07cffa0..377ebf222e3d1 100644 --- a/Zend/tests/dynamic_call_001.phpt +++ b/Zend/tests/dynamic_call_001.phpt @@ -16,7 +16,7 @@ $a::$a(); --EXPECTF-- Deprecated: Methods with the same name as their class will not be constructors in a future version of PHP; foo has a deprecated constructor in %s on line %d -Fatal error: Uncaught EngineException: Non-static method foo::foo() cannot be called statically in %s:%d +Fatal error: Uncaught Error: Non-static method foo::foo() cannot be called statically in %s:%d Stack trace: #0 {main} thrown in %s on line %d diff --git a/Zend/tests/dynamic_call_002.phpt b/Zend/tests/dynamic_call_002.phpt index 5d05680918170..e94f642681d97 100644 --- a/Zend/tests/dynamic_call_002.phpt +++ b/Zend/tests/dynamic_call_002.phpt @@ -9,7 +9,7 @@ $a::$a(); ?> --EXPECTF-- -Fatal error: Uncaught EngineException: Function name must be a string in %s:%d +Fatal error: Uncaught Error: Function name must be a string in %s:%d Stack trace: #0 {main} thrown in %s on line %d diff --git a/Zend/tests/dynamic_call_003.phpt b/Zend/tests/dynamic_call_003.phpt index c929e8b04cfda..b740ab3d4ad63 100644 --- a/Zend/tests/dynamic_call_003.phpt +++ b/Zend/tests/dynamic_call_003.phpt @@ -10,7 +10,7 @@ $a::$b(); ?> --EXPECTF-- -Fatal error: Uncaught EngineException: Function name must be a string in %s:%d +Fatal error: Uncaught Error: Function name must be a string in %s:%d Stack trace: #0 {main} thrown in %s on line %d diff --git a/Zend/tests/dynamic_call_004.phpt b/Zend/tests/dynamic_call_004.phpt index 59da5c7ca5ca1..ad507c29539cc 100644 --- a/Zend/tests/dynamic_call_004.phpt +++ b/Zend/tests/dynamic_call_004.phpt @@ -9,7 +9,7 @@ $a::$b(); --EXPECTF-- Notice: Undefined variable: a in %s on line %d -Fatal error: Uncaught EngineException: Class name must be a valid object or a string in %s:%d +Fatal error: Uncaught Error: Class name must be a valid object or a string in %s:%d Stack trace: #0 {main} thrown in %s on line %d diff --git a/Zend/tests/errmsg_044.phpt b/Zend/tests/errmsg_044.phpt index 4b60b1600ed65..4feecb308c4be 100644 --- a/Zend/tests/errmsg_044.phpt +++ b/Zend/tests/errmsg_044.phpt @@ -8,7 +8,7 @@ $a[0][0] = new stdclass; ?> --EXPECTF-- -Fatal error: Uncaught EngineException: Cannot use object of type stdClass as array in %s:%d +Fatal error: Uncaught Error: Cannot use object of type stdClass as array in %s:%d Stack trace: #0 {main} thrown in %s on line %d diff --git a/Zend/tests/exception_004.phpt b/Zend/tests/exception_004.phpt index b7b776572c56d..9afe81f9c173d 100644 --- a/Zend/tests/exception_004.phpt +++ b/Zend/tests/exception_004.phpt @@ -15,7 +15,7 @@ try { ?> --EXPECTF-- -Fatal error: Uncaught EngineException: Exceptions must be valid objects derived from the Exception base class in %s:%d +Fatal error: Uncaught Error: Cannot throw objects that do not implement Throwable in %s:%d Stack trace: #0 {main} thrown in %s on line %d diff --git a/Zend/tests/exception_005.phpt b/Zend/tests/exception_005.phpt index 0d55f0c6b04d4..15458ec3c4038 100644 --- a/Zend/tests/exception_005.phpt +++ b/Zend/tests/exception_005.phpt @@ -9,7 +9,7 @@ throw new a(); ?> --EXPECTF-- -Fatal error: Uncaught EngineException: Cannot instantiate interface a in %s:%d +Fatal error: Uncaught Error: Cannot instantiate interface a in %s:%d Stack trace: #0 {main} thrown in %s on line %d diff --git a/Zend/tests/exception_006.phpt b/Zend/tests/exception_006.phpt index 31dff03838197..61eb5c7cb310b 100644 --- a/Zend/tests/exception_006.phpt +++ b/Zend/tests/exception_006.phpt @@ -7,7 +7,7 @@ throw 1; ?> --EXPECTF-- -Fatal error: Uncaught EngineException: Can only throw objects in %s:%d +Fatal error: Uncaught Error: Can only throw objects in %s:%d Stack trace: #0 {main} thrown in %s on line %d diff --git a/Zend/tests/exception_013.phpt b/Zend/tests/exception_013.phpt index e1a06cb0d08be..d8f5d907e361d 100644 --- a/Zend/tests/exception_013.phpt +++ b/Zend/tests/exception_013.phpt @@ -8,19 +8,19 @@ class C { try { var_dump(C::$a); -} catch (EngineException $e) { +} catch (Error $e) { echo "\nException: " . $e->getMessage() . " in " , $e->getFile() . " on line " . $e->getLine() . "\n"; } try { var_dump(C::$p); -} catch (EngineException $e) { +} catch (Error $e) { echo "\nException: " . $e->getMessage() . " in " , $e->getFile() . " on line " . $e->getLine() . "\n"; } try { unset(C::$a); -} catch (EngineException $e) { +} catch (Error $e) { echo "\nException: " . $e->getMessage() . " in " , $e->getFile() . " on line " . $e->getLine() . "\n"; } @@ -33,7 +33,7 @@ Exception: Cannot access private property C::$p in %sexception_013.php on line 1 Exception: Attempt to unset static property C::$a in %sexception_013.php on line 19 -Fatal error: Uncaught EngineException: Access to undeclared static property: C::$a in %sexception_013.php:24 +Fatal error: Uncaught Error: Access to undeclared static property: C::$a in %sexception_013.php:24 Stack trace: #0 {main} thrown in %sexception_013.php on line 24 diff --git a/Zend/tests/exception_014.phpt b/Zend/tests/exception_014.phpt index 8da20dccfaee8..fedeee21c9228 100644 --- a/Zend/tests/exception_014.phpt +++ b/Zend/tests/exception_014.phpt @@ -9,7 +9,7 @@ class C { $x = new C; try { var_dump($x->p); -} catch (EngineException $e) { +} catch (Error $e) { echo "\nException: " . $e->getMessage() . " in " , $e->getFile() . " on line " . $e->getLine() . "\n"; } @@ -18,7 +18,7 @@ var_dump($x->p); --EXPECTF-- Exception: Cannot access private property C::$p in %sexception_014.php on line %d -Fatal error: Uncaught EngineException: Cannot access private property C::$p in %sexception_014.php:%d +Fatal error: Uncaught Error: Cannot access private property C::$p in %sexception_014.php:%d Stack trace: #0 {main} thrown in %sexception_014.php on line %d diff --git a/Zend/tests/exception_015.phpt b/Zend/tests/exception_015.phpt index a1b9ae48e2851..e35a1eefe223f 100644 --- a/Zend/tests/exception_015.phpt +++ b/Zend/tests/exception_015.phpt @@ -5,7 +5,7 @@ Exceptions on improper access to string $s = "ABC"; try { $s[] = "D"; -} catch (EngineException $e) { +} catch (Error $e) { echo "\nException: " . $e->getMessage() . " in " , $e->getFile() . " on line " . $e->getLine() . "\n"; } @@ -14,7 +14,7 @@ $s[] = "D"; --EXPECTF-- Exception: [] operator not supported for strings in %sexception_015.php on line %d -Fatal error: Uncaught EngineException: [] operator not supported for strings in %sexception_015.php:%d +Fatal error: Uncaught Error: [] operator not supported for strings in %sexception_015.php:%d Stack trace: #0 {main} thrown in %sexception_015.php on line %d diff --git a/Zend/tests/exception_016.phpt b/Zend/tests/exception_016.phpt index 7e4c4c3e2405b..98831d933ae78 100644 --- a/Zend/tests/exception_016.phpt +++ b/Zend/tests/exception_016.phpt @@ -4,7 +4,7 @@ Exceptions on improper usage of $this foo(); -} catch (EngineException $e) { +} catch (Error $e) { echo "\nException: " . $e->getMessage() . " in " , $e->getFile() . " on line " . $e->getLine() . "\n"; } @@ -13,7 +13,7 @@ $this->foo(); --EXPECTF-- Exception: Using $this when not in object context in %sexception_016.php on line %d -Fatal error: Uncaught EngineException: Using $this when not in object context in %sexception_016.php:%d +Fatal error: Uncaught Error: Using $this when not in object context in %sexception_016.php:%d Stack trace: #0 {main} thrown in %sexception_016.php on line %d diff --git a/Zend/tests/exception_017.phpt b/Zend/tests/exception_017.phpt index 261ce3d091d06..f980b297fbd6b 100644 --- a/Zend/tests/exception_017.phpt +++ b/Zend/tests/exception_017.phpt @@ -11,18 +11,18 @@ function foo(callable $x) { try { C::foo(); -} catch (EngineException $e) { +} catch (Error $e) { echo "\nException: " . $e->getMessage() . " in " , $e->getFile() . " on line " . $e->getLine() . "\n"; } try { foo("C::foo"); -} catch (EngineException $e) { +} catch (Error $e) { echo "\n"; do { echo "Exception: " . $e->getMessage() . "\n"; $e = $e->getPrevious(); - } while ($e instanceof EngineException); + } while ($e instanceof Error); } C::foo(); @@ -33,7 +33,7 @@ Exception: Cannot call abstract method C::foo() in %sexception_017.php on line % Exception: Argument 1 passed to foo() must be callable, string given, called in %sexception_017.php on line %d Exception: Cannot call abstract method C::foo() -Fatal error: Uncaught EngineException: Cannot call abstract method C::foo() in %sexception_017.php:%d +Fatal error: Uncaught Error: Cannot call abstract method C::foo() in %sexception_017.php:%d Stack trace: #0 {main} thrown in %sexception_017.php on line %d diff --git a/Zend/tests/generators/bug63066.phpt b/Zend/tests/generators/bug63066.phpt index a12eb0a80996f..3237c8a7a3cf5 100644 --- a/Zend/tests/generators/bug63066.phpt +++ b/Zend/tests/generators/bug63066.phpt @@ -13,7 +13,7 @@ foreach(gen(new stdClass()) as $value) --EXPECTF-- foo -Fatal error: Uncaught EngineException: Call to undefined method stdClass::fatalError() in %sbug63066.php:5 +Fatal error: Uncaught Error: Call to undefined method stdClass::fatalError() in %sbug63066.php:5 Stack trace: #0 %s(%d): gen(Object(stdClass)) #1 {main} diff --git a/Zend/tests/generators/bug65161.phpt b/Zend/tests/generators/bug65161.phpt index 8c838cbdd38e5..ea0d65a857247 100644 --- a/Zend/tests/generators/bug65161.phpt +++ b/Zend/tests/generators/bug65161.phpt @@ -17,7 +17,7 @@ foreach (testGenerator() as $i); ?> --EXPECTF-- -Fatal error: Uncaught EngineException: Call to undefined function foo() in %s:%d +Fatal error: Uncaught Error: Call to undefined function foo() in %s:%d Stack trace: #0 [internal function]: autoload('SyntaxError') #1 %s(%d): spl_autoload_call('SyntaxError') diff --git a/Zend/tests/generators/clone.phpt b/Zend/tests/generators/clone.phpt index e6720e70c1055..1e8da25136a13 100644 --- a/Zend/tests/generators/clone.phpt +++ b/Zend/tests/generators/clone.phpt @@ -12,7 +12,7 @@ clone $gen; ?> --EXPECTF-- -Fatal error: Uncaught EngineException: Trying to clone an uncloneable object of class Generator in %s:%d +Fatal error: Uncaught Error: Trying to clone an uncloneable object of class Generator in %s:%d Stack trace: #0 {main} thrown in %s on line %d diff --git a/Zend/tests/generators/errors/generator_instantiate_error.phpt b/Zend/tests/generators/errors/generator_instantiate_error.phpt index 4244e9a90dfc6..7e55fe357db34 100644 --- a/Zend/tests/generators/errors/generator_instantiate_error.phpt +++ b/Zend/tests/generators/errors/generator_instantiate_error.phpt @@ -7,7 +7,7 @@ new Generator; ?> --EXPECTF-- -Fatal error: Uncaught EngineException: The "Generator" class is reserved for internal use and cannot be manually instantiated in %s:%d +Fatal error: Uncaught Error: The "Generator" class is reserved for internal use and cannot be manually instantiated in %s:%d Stack trace: #0 {main} thrown in %s on line %d diff --git a/Zend/tests/generators/errors/resume_running_generator_error.phpt b/Zend/tests/generators/errors/resume_running_generator_error.phpt index 48ad1e8df9691..07dad42b01cdf 100644 --- a/Zend/tests/generators/errors/resume_running_generator_error.phpt +++ b/Zend/tests/generators/errors/resume_running_generator_error.phpt @@ -7,7 +7,7 @@ function gen() { $gen = yield; try { $gen->next(); - } catch (EngineException $e) { + } catch (Error $e) { echo "\nException: " . $e->getMessage() . "\n"; } $gen->next(); @@ -21,7 +21,7 @@ $gen->next(); --EXPECTF-- Exception: Cannot resume an already running generator -Fatal error: Uncaught EngineException: Cannot resume an already running generator in %s:%d +Fatal error: Uncaught Error: Cannot resume an already running generator in %s:%d Stack trace: #0 %s(%d): Generator->next() #1 [internal function]: gen() diff --git a/Zend/tests/generators/errors/yield_in_force_closed_finally_error.phpt b/Zend/tests/generators/errors/yield_in_force_closed_finally_error.phpt index a9f56af041d2f..af84e50215cef 100644 --- a/Zend/tests/generators/errors/yield_in_force_closed_finally_error.phpt +++ b/Zend/tests/generators/errors/yield_in_force_closed_finally_error.phpt @@ -26,7 +26,7 @@ unset($gen); before yield before yield in finally -Fatal error: Uncaught EngineException: Cannot yield from finally in a force-closed generator in %s:%d +Fatal error: Uncaught Error: Cannot yield from finally in a force-closed generator in %s:%d Stack trace: #0 %s(%d): gen() #1 {main} diff --git a/Zend/tests/generators/throw_not_an_exception.phpt b/Zend/tests/generators/throw_not_an_exception.phpt index 29f25252a8492..920d8eb8473b2 100644 --- a/Zend/tests/generators/throw_not_an_exception.phpt +++ b/Zend/tests/generators/throw_not_an_exception.phpt @@ -12,7 +12,7 @@ $gen->throw(new stdClass); ?> --EXPECTF-- -Fatal error: Uncaught EngineException: Exceptions must be valid objects derived from the Exception base class in %s:%d +Fatal error: Uncaught Error: Cannot throw objects that do not implement Throwable in %s:%d Stack trace: #0 [internal function]: gen() #1 %s(%d): Generator->throw(Object(stdClass)) diff --git a/Zend/tests/generators/yield_from_already_running.phpt b/Zend/tests/generators/yield_from_already_running.phpt index 2242542525d38..5f2654dd6b417 100644 --- a/Zend/tests/generators/yield_from_already_running.phpt +++ b/Zend/tests/generators/yield_from_already_running.phpt @@ -11,7 +11,7 @@ function gen() { ?> --EXPECTF-- -Fatal error: Uncaught EngineException: Impossible to yield from the Generator being currently run in %s:%d +Fatal error: Uncaught Error: Impossible to yield from the Generator being currently run in %s:%d Stack trace: #0 [internal function]: gen() #1 %s(%d): Generator->send(Object(Generator)) diff --git a/Zend/tests/indirect_call_array_001.phpt b/Zend/tests/indirect_call_array_001.phpt index f9075496fb005..d76837c8eb90f 100644 --- a/Zend/tests/indirect_call_array_001.phpt +++ b/Zend/tests/indirect_call_array_001.phpt @@ -8,7 +8,7 @@ $arr(); ?> --EXPECTF-- -Fatal error: Uncaught EngineException: Class 'a' not found in %s:%d +Fatal error: Uncaught Error: Class 'a' not found in %s:%d Stack trace: #0 {main} thrown in %s on line %d diff --git a/Zend/tests/indirect_call_array_002.phpt b/Zend/tests/indirect_call_array_002.phpt index 24927931390a1..5ef12f5cfbe88 100644 --- a/Zend/tests/indirect_call_array_002.phpt +++ b/Zend/tests/indirect_call_array_002.phpt @@ -8,7 +8,7 @@ $arr(); ?> --EXPECTF-- -Fatal error: Uncaught EngineException: Call to undefined method stdClass::b() in %s:%d +Fatal error: Uncaught Error: Call to undefined method stdClass::b() in %s:%d Stack trace: #0 {main} thrown in %s on line %d diff --git a/Zend/tests/indirect_method_call_002.phpt b/Zend/tests/indirect_method_call_002.phpt index ec3df8f268a49..059061f211550 100644 --- a/Zend/tests/indirect_method_call_002.phpt +++ b/Zend/tests/indirect_method_call_002.phpt @@ -29,7 +29,7 @@ string(7) "testing" string(3) "foo" NULL -Fatal error: Uncaught EngineException: Call to undefined method foo::www() in %s:%d +Fatal error: Uncaught Error: Call to undefined method foo::www() in %s:%d Stack trace: #0 {main} thrown in %s on line %d diff --git a/Zend/tests/list_005.phpt b/Zend/tests/list_005.phpt index f03cf0a4040ba..7dc3bf6fa36a6 100644 --- a/Zend/tests/list_005.phpt +++ b/Zend/tests/list_005.phpt @@ -44,7 +44,7 @@ NULL NULL ---- -Fatal error: Uncaught EngineException: Cannot use object of type stdClass as array in %s:%d +Fatal error: Uncaught Error: Cannot use object of type stdClass as array in %s:%d Stack trace: #0 {main} thrown in %s on line %d diff --git a/Zend/tests/list_007.phpt b/Zend/tests/list_007.phpt index 62de5c318c9eb..67c65245ccf67 100644 --- a/Zend/tests/list_007.phpt +++ b/Zend/tests/list_007.phpt @@ -9,7 +9,7 @@ var_dump($x, $y); ?> --EXPECTF-- -Fatal error: Uncaught EngineException: Cannot use object of type Closure as array in %slist_007.php:3 +Fatal error: Uncaught Error: Cannot use object of type Closure as array in %slist_007.php:3 Stack trace: #0 {main} thrown in %slist_007.php on line 3 diff --git a/Zend/tests/methods-on-non-objects.phpt b/Zend/tests/methods-on-non-objects.phpt index 892424519fc59..13002c94a3871 100644 --- a/Zend/tests/methods-on-non-objects.phpt +++ b/Zend/tests/methods-on-non-objects.phpt @@ -9,7 +9,7 @@ echo "Should not get here!\n"; ?> --EXPECTF-- -Fatal error: Uncaught EngineException: Call to a member function method() on null in %s:%d +Fatal error: Uncaught Error: Call to a member function method() on null in %s:%d Stack trace: #0 {main} thrown in %s on line %d diff --git a/Zend/tests/mul_001.phpt b/Zend/tests/mul_001.phpt index 4c00c9cc76164..d5843eef5f2a9 100644 --- a/Zend/tests/mul_001.phpt +++ b/Zend/tests/mul_001.phpt @@ -8,7 +8,7 @@ $b = array(1); try { var_dump($a * $b); -} catch (EngineException $e) { +} catch (Error $e) { echo "\nException: " . $e->getMessage() . "\n"; } @@ -20,7 +20,7 @@ echo "Done\n"; --EXPECTF-- Exception: Unsupported operand types -Fatal error: Uncaught EngineException: Unsupported operand types in %s:%d +Fatal error: Uncaught Error: Unsupported operand types in %s:%d Stack trace: #0 {main} thrown in %s on line %d diff --git a/Zend/tests/not_002.phpt b/Zend/tests/not_002.phpt index 7e1dafeaab86e..e59049c2a2176 100644 --- a/Zend/tests/not_002.phpt +++ b/Zend/tests/not_002.phpt @@ -8,7 +8,7 @@ $b = array(1,2); try { var_dump(~$b); -} catch (EngineException $e) { +} catch (Error $e) { echo "\nException: " . $e->getMessage() . "\n"; } @@ -20,7 +20,7 @@ echo "Done\n"; --EXPECTF-- Exception: Unsupported operand types -Fatal error: Uncaught EngineException: Unsupported operand types in %s:%d +Fatal error: Uncaught Error: Unsupported operand types in %s:%d Stack trace: #0 {main} thrown in %s on line %d diff --git a/Zend/tests/ns_004.phpt b/Zend/tests/ns_004.phpt index 542251a6e06af..44b618cd708d1 100644 --- a/Zend/tests/ns_004.phpt +++ b/Zend/tests/ns_004.phpt @@ -6,7 +6,7 @@ namespace test\ns1; echo get_class(new Exception()),"\n"; --EXPECTF-- -Fatal error: Uncaught EngineException: Class 'test\ns1\Exception' not found in %sns_004.php:%d +Fatal error: Uncaught Error: Class 'test\ns1\Exception' not found in %sns_004.php:%d Stack trace: #0 {main} thrown in %sns_004.php on line %d \ No newline at end of file diff --git a/Zend/tests/ns_026.phpt b/Zend/tests/ns_026.phpt index 7e4d14ede623b..b8f8c3f83d6ac 100644 --- a/Zend/tests/ns_026.phpt +++ b/Zend/tests/ns_026.phpt @@ -32,7 +32,7 @@ Method - Foo\Foo::__construct Method - Foo\Foo::Bar Func - Foo\Bar -Fatal error: Uncaught EngineException: Call to undefined function Foo\Foo\Bar() in %sns_026.php:%d +Fatal error: Uncaught Error: Call to undefined function Foo\Foo\Bar() in %sns_026.php:%d Stack trace: #0 {main} thrown in %sns_026.php on line %d \ No newline at end of file diff --git a/Zend/tests/ns_038.phpt b/Zend/tests/ns_038.phpt index f40eb07c8d665..9cef33d82b31e 100644 --- a/Zend/tests/ns_038.phpt +++ b/Zend/tests/ns_038.phpt @@ -11,7 +11,7 @@ function foo() { --EXPECTF-- ok -Fatal error: Uncaught EngineException: Call to undefined method Exception::bar() in %sns_038.php:7 +Fatal error: Uncaught Error: Call to undefined method Exception::bar() in %sns_038.php:7 Stack trace: #0 {main} thrown in %sns_038.php on line 7 diff --git a/Zend/tests/ns_057.phpt b/Zend/tests/ns_057.phpt index 006b113e2ef6e..639687ee0a510 100644 --- a/Zend/tests/ns_057.phpt +++ b/Zend/tests/ns_057.phpt @@ -56,7 +56,7 @@ const ok class ok ok -Fatal error: Uncaught EngineException: Undefined constant 'Test\ns1\unknown' in %sns_057.php:%d +Fatal error: Uncaught Error: Undefined constant 'Test\ns1\unknown' in %sns_057.php:%d Stack trace: #0 {main} thrown in %sns_057.php on line %d \ No newline at end of file diff --git a/Zend/tests/ns_058.phpt b/Zend/tests/ns_058.phpt index 77a4c71391973..54e84aa030d77 100644 --- a/Zend/tests/ns_058.phpt +++ b/Zend/tests/ns_058.phpt @@ -54,7 +54,7 @@ const ok class ok ok -Fatal error: Uncaught EngineException: Undefined constant 'unknown' in %sns_058.php:%d +Fatal error: Uncaught Error: Undefined constant 'unknown' in %sns_058.php:%d Stack trace: #0 {main} thrown in %sns_058.php on line %d diff --git a/Zend/tests/ns_071.phpt b/Zend/tests/ns_071.phpt index 08a0b898d644a..53ff7f018a529 100644 --- a/Zend/tests/ns_071.phpt +++ b/Zend/tests/ns_071.phpt @@ -18,7 +18,7 @@ new bar(new \stdclass); --EXPECTF-- NULL -Fatal error: Uncaught TypeException: Argument 1 passed to foo\bar::__construct() must be of the type array, object given, called in %s on line %d and defined in %s:%d +Fatal error: Uncaught TypeError: Argument 1 passed to foo\bar::__construct() must be of the type array, object given, called in %s on line %d and defined in %s:%d Stack trace: #0 %s(%d): foo\bar->__construct() #1 {main} diff --git a/Zend/tests/ns_072.phpt b/Zend/tests/ns_072.phpt index 95f8f95045276..877095df4a63e 100644 --- a/Zend/tests/ns_072.phpt +++ b/Zend/tests/ns_072.phpt @@ -30,7 +30,7 @@ object(foo\test)#%d (0) { } NULL -Fatal error: Uncaught TypeException: Argument 1 passed to foo\bar::__construct() must implement interface foo\foo, instance of stdClass given, called in %s on line %d and defined in %s:%d +Fatal error: Uncaught TypeError: Argument 1 passed to foo\bar::__construct() must implement interface foo\foo, instance of stdClass given, called in %s on line %d and defined in %s:%d Stack trace: #0 %s(%d): foo\bar->__construct() #1 {main} diff --git a/Zend/tests/ns_076.phpt b/Zend/tests/ns_076.phpt index 53df5d8077375..1468654d55ad0 100644 --- a/Zend/tests/ns_076.phpt +++ b/Zend/tests/ns_076.phpt @@ -22,7 +22,7 @@ array(1) { %s(7) "unknown" } -Fatal error: Uncaught EngineException: Undefined constant 'unknown' in %sns_076.php:%d +Fatal error: Uncaught Error: Undefined constant 'unknown' in %sns_076.php:%d Stack trace: #0 {main} thrown in %sns_076.php on line %d diff --git a/Zend/tests/ns_077_1.phpt b/Zend/tests/ns_077_1.phpt index fdcf6cf954355..b59f8172eaa52 100644 --- a/Zend/tests/ns_077_1.phpt +++ b/Zend/tests/ns_077_1.phpt @@ -10,7 +10,7 @@ function foo($a = array(0 => \unknown)) foo(); --EXPECTF-- -Fatal error: Uncaught EngineException: Undefined constant 'unknown' in %sns_077_%d.php:%d +Fatal error: Uncaught Error: Undefined constant 'unknown' in %sns_077_%d.php:%d Stack trace: #0 %s(%d): foo\foo() #1 {main} diff --git a/Zend/tests/ns_077_2.phpt b/Zend/tests/ns_077_2.phpt index f64b80939f865..d51350c56a98b 100644 --- a/Zend/tests/ns_077_2.phpt +++ b/Zend/tests/ns_077_2.phpt @@ -10,7 +10,7 @@ function foo($a = array(\unknown => unknown)) foo(); --EXPECTF-- -Fatal error: Uncaught EngineException: Undefined constant 'unknown' in %sns_077_%d.php:%d +Fatal error: Uncaught Error: Undefined constant 'unknown' in %sns_077_%d.php:%d Stack trace: #0 %s(%d): foo\foo() #1 {main} diff --git a/Zend/tests/ns_077_3.phpt b/Zend/tests/ns_077_3.phpt index 05d1c91c47eb9..0e90195c0578b 100644 --- a/Zend/tests/ns_077_3.phpt +++ b/Zend/tests/ns_077_3.phpt @@ -10,7 +10,7 @@ function foo($a = array(namespace\unknown => unknown)) foo(); --EXPECTF-- -Fatal error: Uncaught EngineException: Undefined constant 'foo\unknown' in %sns_077_%d.php:%d +Fatal error: Uncaught Error: Undefined constant 'foo\unknown' in %sns_077_%d.php:%d Stack trace: #0 %s(%d): foo\foo() #1 {main} diff --git a/Zend/tests/ns_077_4.phpt b/Zend/tests/ns_077_4.phpt index ce30aeedccc06..72c3233a63e1e 100644 --- a/Zend/tests/ns_077_4.phpt +++ b/Zend/tests/ns_077_4.phpt @@ -10,7 +10,7 @@ function foo($a = array(0 => namespace\unknown)) foo(); --EXPECTF-- -Fatal error: Uncaught EngineException: Undefined constant 'foo\unknown' in %sns_077_%d.php:%d +Fatal error: Uncaught Error: Undefined constant 'foo\unknown' in %sns_077_%d.php:%d Stack trace: #0 %s(%d): foo\foo() #1 {main} diff --git a/Zend/tests/ns_077_5.phpt b/Zend/tests/ns_077_5.phpt index 230d2acc6398c..05235442e5639 100644 --- a/Zend/tests/ns_077_5.phpt +++ b/Zend/tests/ns_077_5.phpt @@ -9,7 +9,7 @@ function foo($a = array(0 => \unknown)) foo(); --EXPECTF-- -Fatal error: Uncaught EngineException: Undefined constant 'unknown' in %sns_077_%d.php:%d +Fatal error: Uncaught Error: Undefined constant 'unknown' in %sns_077_%d.php:%d Stack trace: #0 %s(%d): foo() #1 {main} diff --git a/Zend/tests/ns_077_6.phpt b/Zend/tests/ns_077_6.phpt index 230d2acc6398c..05235442e5639 100644 --- a/Zend/tests/ns_077_6.phpt +++ b/Zend/tests/ns_077_6.phpt @@ -9,7 +9,7 @@ function foo($a = array(0 => \unknown)) foo(); --EXPECTF-- -Fatal error: Uncaught EngineException: Undefined constant 'unknown' in %sns_077_%d.php:%d +Fatal error: Uncaught Error: Undefined constant 'unknown' in %sns_077_%d.php:%d Stack trace: #0 %s(%d): foo() #1 {main} diff --git a/Zend/tests/ns_077_7.phpt b/Zend/tests/ns_077_7.phpt index 069d825073e4f..166bf31cc724e 100644 --- a/Zend/tests/ns_077_7.phpt +++ b/Zend/tests/ns_077_7.phpt @@ -9,7 +9,7 @@ function foo($a = array(0 => namespace\unknown)) foo(); --EXPECTF-- -Fatal error: Uncaught EngineException: Undefined constant 'unknown' in %sns_077_%d.php:%d +Fatal error: Uncaught Error: Undefined constant 'unknown' in %sns_077_%d.php:%d Stack trace: #0 %s(%d): foo() #1 {main} diff --git a/Zend/tests/ns_077_8.phpt b/Zend/tests/ns_077_8.phpt index b271effecf688..e081842460dd3 100644 --- a/Zend/tests/ns_077_8.phpt +++ b/Zend/tests/ns_077_8.phpt @@ -9,7 +9,7 @@ function foo($a = array(namespace\unknown => unknown)) foo(); --EXPECTF-- -Fatal error: Uncaught EngineException: Undefined constant 'unknown' in %sns_077_%d.php:%d +Fatal error: Uncaught Error: Undefined constant 'unknown' in %sns_077_%d.php:%d Stack trace: #0 %s(%d): foo() #1 {main} diff --git a/Zend/tests/ns_092.phpt b/Zend/tests/ns_092.phpt index 1d063e65fbffc..21a1dd916a173 100644 --- a/Zend/tests/ns_092.phpt +++ b/Zend/tests/ns_092.phpt @@ -64,7 +64,7 @@ Foo\Bar\fiz Foo\Bar\biz Foo\Bar\buz -Fatal error: Uncaught EngineException: Call to undefined function Foo\Bar\A() in %sns_092.php:45 +Fatal error: Uncaught Error: Call to undefined function Foo\Bar\A() in %sns_092.php:45 Stack trace: #0 {main} thrown in %sns_092.php on line 45 diff --git a/Zend/tests/objects_017.phpt b/Zend/tests/objects_017.phpt index 0f9f3daa13443..ab992b682e162 100644 --- a/Zend/tests/objects_017.phpt +++ b/Zend/tests/objects_017.phpt @@ -15,7 +15,7 @@ test()->test = 2; ?> --EXPECTF-- -Fatal error: Uncaught EngineException: Cannot access private property foo::$test in %s:%d +Fatal error: Uncaught Error: Cannot access private property foo::$test in %s:%d Stack trace: #0 {main} thrown in %s on line %d diff --git a/Zend/tests/objects_022.phpt b/Zend/tests/objects_022.phpt index e96a6aa1636a4..913de7d990733 100644 --- a/Zend/tests/objects_022.phpt +++ b/Zend/tests/objects_022.phpt @@ -36,7 +36,7 @@ object(bar)#%d (0) { object(baz)#%d (0) { } -Fatal error: Uncaught TypeException: Argument 1 passed to foo::testFoo() must be an instance of foo, instance of stdClass given, called in %s on line %d and defined in %s:%d +Fatal error: Uncaught TypeError: Argument 1 passed to foo::testFoo() must be an instance of foo, instance of stdClass given, called in %s on line %d and defined in %s:%d Stack trace: #0 %s(%d): foo->testFoo() #1 {main} diff --git a/Zend/tests/objects_025.phpt b/Zend/tests/objects_025.phpt index 7f58696efb5b7..8f7e961748e6b 100644 --- a/Zend/tests/objects_025.phpt +++ b/Zend/tests/objects_025.phpt @@ -43,7 +43,7 @@ static - ok non-static - ok static - ok -Fatal error: Uncaught EngineException: Method name must be a string in %s:%d +Fatal error: Uncaught Error: Method name must be a string in %s:%d Stack trace: #0 {main} thrown in %s on line %d diff --git a/Zend/tests/objects_026.phpt b/Zend/tests/objects_026.phpt index 2ea8785658fd0..b347cf721c5bc 100644 --- a/Zend/tests/objects_026.phpt +++ b/Zend/tests/objects_026.phpt @@ -10,7 +10,7 @@ try { ?> --EXPECTF-- -Fatal error: Uncaught EngineException: Using $this when not in object context in %s:%d +Fatal error: Uncaught Error: Using $this when not in object context in %s:%d Stack trace: #0 {main} thrown in %s on line %d diff --git a/Zend/tests/objects_029.phpt b/Zend/tests/objects_029.phpt index b8a01af26060f..afccfa3d61c4c 100644 --- a/Zend/tests/objects_029.phpt +++ b/Zend/tests/objects_029.phpt @@ -23,7 +23,7 @@ new foo; ?> --EXPECTF-- -Fatal error: Uncaught EngineException: Access to undeclared static property: foo::$f in %s:%d +Fatal error: Uncaught Error: Access to undeclared static property: foo::$f in %s:%d Stack trace: #0 %s(%d): foo->__construct() #1 {main} diff --git a/Zend/tests/objects_030.phpt b/Zend/tests/objects_030.phpt index 35db8528d026e..c42babc183c69 100644 --- a/Zend/tests/objects_030.phpt +++ b/Zend/tests/objects_030.phpt @@ -23,7 +23,7 @@ new foo; ?> --EXPECTF-- -Fatal error: Uncaught EngineException: Access to undeclared static property: bar::$f in %s:%d +Fatal error: Uncaught Error: Access to undeclared static property: bar::$f in %s:%d Stack trace: #0 %s(%d): foo->__construct() #1 {main} diff --git a/Zend/tests/offset_assign.phpt b/Zend/tests/offset_assign.phpt index b1d7fe444f079..caa717935f250 100644 --- a/Zend/tests/offset_assign.phpt +++ b/Zend/tests/offset_assign.phpt @@ -10,7 +10,7 @@ echo "Done\n"; --EXPECTF-- Warning: Illegal string offset 'x' in %soffset_assign.php on line %d -Fatal error: Uncaught EngineException: Cannot use string offset as an array in %soffset_assign.php:%d +Fatal error: Uncaught Error: Cannot use string offset as an array in %soffset_assign.php:%d Stack trace: #0 {main} thrown in %soffset_assign.php on line %d diff --git a/Zend/tests/offset_object.phpt b/Zend/tests/offset_object.phpt index a4f970c636458..7ab636b6a89c7 100644 --- a/Zend/tests/offset_object.phpt +++ b/Zend/tests/offset_object.phpt @@ -8,7 +8,7 @@ var_dump($object[1]); ?> --EXPECTF-- -Fatal error: Uncaught EngineException: Cannot use object of type stdClass as array in %s:%d +Fatal error: Uncaught Error: Cannot use object of type stdClass as array in %s:%d Stack trace: #0 {main} thrown in %s on line %d diff --git a/Zend/tests/parent_class_name_without_parent.phpt b/Zend/tests/parent_class_name_without_parent.phpt index f5ed6117567dc..622aefeab053a 100644 --- a/Zend/tests/parent_class_name_without_parent.phpt +++ b/Zend/tests/parent_class_name_without_parent.phpt @@ -17,7 +17,7 @@ class C { ?> --EXPECTF-- -Fatal error: Uncaught EngineException: Cannot use "parent" when current class scope has no parent in %s:5 +Fatal error: Uncaught Error: Cannot use "parent" when current class scope has no parent in %s:5 Stack trace: #0 %s(%d): C->f() #1 {main} diff --git a/Zend/tests/return_types/001.phpt b/Zend/tests/return_types/001.phpt index 2d2966aed3d77..13bf93f4dfc94 100644 --- a/Zend/tests/return_types/001.phpt +++ b/Zend/tests/return_types/001.phpt @@ -9,7 +9,7 @@ function test1() : array { test1(); --EXPECTF-- -Fatal error: Uncaught TypeException: Return value of test1() must be of the type array, none returned in %s:%d +Fatal error: Uncaught TypeError: Return value of test1() must be of the type array, none returned in %s:%d Stack trace: #0 %s(%d): test1() #1 {main} diff --git a/Zend/tests/return_types/002.phpt b/Zend/tests/return_types/002.phpt index 92553ee89ea35..5921634553b80 100644 --- a/Zend/tests/return_types/002.phpt +++ b/Zend/tests/return_types/002.phpt @@ -10,7 +10,7 @@ function test1() : array { test1(); --EXPECTF-- -Fatal error: Uncaught TypeException: Return value of test1() must be of the type array, null returned in %s:%d +Fatal error: Uncaught TypeError: Return value of test1() must be of the type array, null returned in %s:%d Stack trace: #0 %s(%d): test1() #1 {main} diff --git a/Zend/tests/return_types/003.phpt b/Zend/tests/return_types/003.phpt index 20dd8bff62ded..e12e215de2494 100644 --- a/Zend/tests/return_types/003.phpt +++ b/Zend/tests/return_types/003.phpt @@ -9,7 +9,7 @@ function test1() : array { test1(); --EXPECTF-- -Fatal error: Uncaught TypeException: Return value of test1() must be of the type array, integer returned in %s:%d +Fatal error: Uncaught TypeError: Return value of test1() must be of the type array, integer returned in %s:%d Stack trace: #0 %s(%d): test1() #1 {main} diff --git a/Zend/tests/return_types/004.phpt b/Zend/tests/return_types/004.phpt index f7a4b3dea29b1..7865eb9d4d3ee 100644 --- a/Zend/tests/return_types/004.phpt +++ b/Zend/tests/return_types/004.phpt @@ -10,7 +10,7 @@ function test1() : array { test1(); --EXPECTF-- -Fatal error: Uncaught TypeException: Return value of test1() must be of the type array, string returned in %s:%d +Fatal error: Uncaught TypeError: Return value of test1() must be of the type array, string returned in %s:%d Stack trace: #0 %s(%d): test1() #1 {main} diff --git a/Zend/tests/return_types/005.phpt b/Zend/tests/return_types/005.phpt index edf54db07cb9f..a114b3ee93de6 100644 --- a/Zend/tests/return_types/005.phpt +++ b/Zend/tests/return_types/005.phpt @@ -15,7 +15,7 @@ $qux = new qux(); $qux->foo(); --EXPECTF-- -Fatal error: Uncaught TypeException: Return value of qux::foo() must be an instance of foo, instance of qux returned in %s:%d +Fatal error: Uncaught TypeError: Return value of qux::foo() must be an instance of foo, instance of qux returned in %s:%d Stack trace: #0 %s(%d): qux->foo() #1 {main} diff --git a/Zend/tests/return_types/010.phpt b/Zend/tests/return_types/010.phpt index ce297b01b114e..1a117d0cbc232 100644 --- a/Zend/tests/return_types/010.phpt +++ b/Zend/tests/return_types/010.phpt @@ -11,7 +11,7 @@ $array = [1, 2, 3]; var_dump(foo($array)); --EXPECTF-- -Fatal error: Uncaught TypeException: Return value of foo() must be of the type array, null returned in %s:%d +Fatal error: Uncaught TypeError: Return value of foo() must be of the type array, null returned in %s:%d Stack trace: #0 %s(%d): foo(Array) #1 {main} diff --git a/Zend/tests/return_types/013.phpt b/Zend/tests/return_types/013.phpt index b0acb36132ef0..673a8f9dbcdbf 100644 --- a/Zend/tests/return_types/013.phpt +++ b/Zend/tests/return_types/013.phpt @@ -16,7 +16,7 @@ $baz = new foo(); var_dump($func=$baz->bar(), $func()); --EXPECTF-- -Fatal error: Uncaught TypeException: Return value of foo::{closure}() must be of the type array, null returned in %s:%d +Fatal error: Uncaught TypeError: Return value of foo::{closure}() must be of the type array, null returned in %s:%d Stack trace: #0 %s(%d): foo->{closure}() #1 {main} diff --git a/Zend/tests/return_types/rfc001.phpt b/Zend/tests/return_types/rfc001.phpt index de308ca26c54a..5a1d42b446961 100644 --- a/Zend/tests/return_types/rfc001.phpt +++ b/Zend/tests/return_types/rfc001.phpt @@ -11,7 +11,7 @@ function get_config(): array { get_config(); --EXPECTF-- -Fatal error: Uncaught TypeException: Return value of get_config() must be of the type array, integer returned in %s:%d +Fatal error: Uncaught TypeError: Return value of get_config() must be of the type array, integer returned in %s:%d Stack trace: #0 %s(%d): get_config() #1 {main} diff --git a/Zend/tests/return_types/rfc003.phpt b/Zend/tests/return_types/rfc003.phpt index 2beb6f36507bd..ae4c5b7f60e1c 100644 --- a/Zend/tests/return_types/rfc003.phpt +++ b/Zend/tests/return_types/rfc003.phpt @@ -10,7 +10,7 @@ function foo(): DateTime { foo(); --EXPECTF-- -Fatal error: Uncaught TypeException: Return value of foo() must be an instance of DateTime, null returned in %s:%d +Fatal error: Uncaught TypeError: Return value of foo() must be an instance of DateTime, null returned in %s:%d Stack trace: #0 %s(%d): foo() #1 {main} diff --git a/Zend/tests/str_offset_002.phpt b/Zend/tests/str_offset_002.phpt index 8e29980d67f5b..2f5e4ee890958 100644 --- a/Zend/tests/str_offset_002.phpt +++ b/Zend/tests/str_offset_002.phpt @@ -6,7 +6,7 @@ $a = "aaa"; $x = array(&$a[1]); ?> --EXPECTF-- -Fatal error: Uncaught EngineException: Cannot create references to/from string offsets in %sstr_offset_002.php:3 -Stack trace: -#0 {main} +Fatal error: Uncaught Error: Cannot create references to/from string offsets in %sstr_offset_002.php:3 +Stack trace: +#0 {main} thrown in %sstr_offset_002.php on line 3 diff --git a/Zend/tests/sub_001.phpt b/Zend/tests/sub_001.phpt index 8a0e60f928b18..27091d1c5f9d3 100644 --- a/Zend/tests/sub_001.phpt +++ b/Zend/tests/sub_001.phpt @@ -8,7 +8,7 @@ $b = array(1); try { var_dump($a - $b); -} catch (EngineException $e) { +} catch (Error $e) { echo "\nException: " . $e->getMessage() . "\n"; } @@ -20,7 +20,7 @@ echo "Done\n"; --EXPECTF-- Exception: Unsupported operand types -Fatal error: Uncaught EngineException: Unsupported operand types in %s:%d +Fatal error: Uncaught Error: Unsupported operand types in %s:%d Stack trace: #0 {main} thrown in %s on line %d diff --git a/Zend/tests/traits/bug60173.phpt b/Zend/tests/traits/bug60173.phpt index 88381ded5a2ae..f525a66aeeeb8 100644 --- a/Zend/tests/traits/bug60173.phpt +++ b/Zend/tests/traits/bug60173.phpt @@ -9,7 +9,7 @@ $rc = new ReflectionClass('foo'); $rc->newInstance(); --EXPECTF-- -Fatal error: Uncaught EngineException: Cannot instantiate trait foo in %s:%d +Fatal error: Uncaught Error: Cannot instantiate trait foo in %s:%d Stack trace: #0 %s(%d): ReflectionClass->newInstance() #1 {main} diff --git a/Zend/tests/traits/bugs/alias01.phpt b/Zend/tests/traits/bugs/alias01.phpt index 7d0dfed1871b5..4b89a54ddaacf 100644 --- a/Zend/tests/traits/bugs/alias01.phpt +++ b/Zend/tests/traits/bugs/alias01.phpt @@ -23,7 +23,7 @@ T:m1 T:m1 T:m2 -Fatal error: Uncaught EngineException: Call to undefined method C1::a2() in %s:%d +Fatal error: Uncaught Error: Call to undefined method C1::a2() in %s:%d Stack trace: #0 {main} thrown in %s on line %d diff --git a/Zend/tests/traits/error_007.phpt b/Zend/tests/traits/error_007.phpt index 85c65e48aeedb..c015f6ea767cc 100644 --- a/Zend/tests/traits/error_007.phpt +++ b/Zend/tests/traits/error_007.phpt @@ -10,7 +10,7 @@ new abc; ?> --EXPECTF-- -Fatal error: Uncaught EngineException: Cannot instantiate trait abc in %s:%d +Fatal error: Uncaught Error: Cannot instantiate trait abc in %s:%d Stack trace: #0 {main} thrown in %s on line %d diff --git a/Zend/tests/traits/error_012.phpt b/Zend/tests/traits/error_012.phpt index ba1055e161701..50a454c324983 100644 --- a/Zend/tests/traits/error_012.phpt +++ b/Zend/tests/traits/error_012.phpt @@ -16,7 +16,7 @@ var_dump($x->test()); ?> --EXPECTF-- -Fatal error: Uncaught EngineException: Call to protected method bar::test() from context '' in %s:%d +Fatal error: Uncaught Error: Call to protected method bar::test() from context '' in %s:%d Stack trace: #0 {main} thrown in %s on line %d diff --git a/Zend/tests/traits/language008a.phpt b/Zend/tests/traits/language008a.phpt index 34bfd38a583dc..0d7a694d57ee2 100644 --- a/Zend/tests/traits/language008a.phpt +++ b/Zend/tests/traits/language008a.phpt @@ -20,7 +20,7 @@ $o->sayHello(); ?> --EXPECTF-- -Fatal error: Uncaught EngineException: Call to protected method MyClass::sayHello() from context '' in %s:%d +Fatal error: Uncaught Error: Call to protected method MyClass::sayHello() from context '' in %s:%d Stack trace: #0 {main} thrown in %s on line %d \ No newline at end of file diff --git a/Zend/tests/traits/language008b.phpt b/Zend/tests/traits/language008b.phpt index e3c099f74e98e..8f745126e3cc9 100644 --- a/Zend/tests/traits/language008b.phpt +++ b/Zend/tests/traits/language008b.phpt @@ -27,7 +27,7 @@ $o->sayHelloWorld(); ?> --EXPECTF-- Hello World!Hello World! -Fatal error: Uncaught EngineException: Call to private method MyClass::sayHelloWorld() from context '' in %s:%d +Fatal error: Uncaught Error: Call to private method MyClass::sayHelloWorld() from context '' in %s:%d Stack trace: #0 {main} thrown in %s on line %d \ No newline at end of file diff --git a/Zend/tests/typehints/explicit_weak_include_strict.phpt b/Zend/tests/typehints/explicit_weak_include_strict.phpt index d39c6b6a0aa5e..1593c709507bc 100644 --- a/Zend/tests/typehints/explicit_weak_include_strict.phpt +++ b/Zend/tests/typehints/explicit_weak_include_strict.phpt @@ -11,7 +11,7 @@ require 'weak_include_strict_2.inc'; // calls within that file should stay strict, despite being included by weak file ?> --EXPECTF-- -Fatal error: Uncaught TypeException: Argument 1 passed to takes_int() must be of the type integer, float given, called in %sweak_include_strict_2.inc on line 9 and defined in %sweak_include_strict_2.inc:5 +Fatal error: Uncaught TypeError: Argument 1 passed to takes_int() must be of the type integer, float given, called in %sweak_include_strict_2.inc on line 9 and defined in %sweak_include_strict_2.inc:5 Stack trace: #0 %s(%d): takes_int() #1 %s(%d): require('%s') diff --git a/Zend/tests/typehints/scalar_constant_defaults_error.phpt b/Zend/tests/typehints/scalar_constant_defaults_error.phpt index 4e037bafb3b52..f341d205af44e 100644 --- a/Zend/tests/typehints/scalar_constant_defaults_error.phpt +++ b/Zend/tests/typehints/scalar_constant_defaults_error.phpt @@ -13,7 +13,7 @@ var_dump(int_val()); ?> --EXPECTF-- -Fatal error: Uncaught TypeException: Argument 1 passed to int_val() must be of the type integer, string given, called in %s on line %d and defined in %s:%d +Fatal error: Uncaught TypeError: Argument 1 passed to int_val() must be of the type integer, string given, called in %s on line %d and defined in %s:%d Stack trace: #0 %s(%d): int_val() #1 {main} diff --git a/Zend/tests/typehints/strict_call_weak.phpt b/Zend/tests/typehints/strict_call_weak.phpt index 3b92244824049..8ebed2216b336 100644 --- a/Zend/tests/typehints/strict_call_weak.phpt +++ b/Zend/tests/typehints/strict_call_weak.phpt @@ -13,7 +13,7 @@ require 'strict_call_weak_2.inc'; function_declared_in_weak_mode(1.0); ?> --EXPECTF-- -Fatal error: Uncaught TypeException: Argument 1 passed to function_declared_in_weak_mode() must be of the type integer, float given, called in %sstrict_call_weak.php on line 10 and defined in %sstrict_call_weak_2.inc:5 +Fatal error: Uncaught TypeError: Argument 1 passed to function_declared_in_weak_mode() must be of the type integer, float given, called in %sstrict_call_weak.php on line 10 and defined in %sstrict_call_weak_2.inc:5 Stack trace: #0 %s(%d): function_declared_in_weak_mode() #1 {main} diff --git a/Zend/tests/typehints/strict_call_weak_explicit.phpt b/Zend/tests/typehints/strict_call_weak_explicit.phpt index fdb92fcf29d33..215a0b1fcbe11 100644 --- a/Zend/tests/typehints/strict_call_weak_explicit.phpt +++ b/Zend/tests/typehints/strict_call_weak_explicit.phpt @@ -13,7 +13,7 @@ require 'strict_call_weak_explicit_2.inc'; function_declared_in_weak_mode(1.0); ?> --EXPECTF-- -Fatal error: Uncaught TypeException: Argument 1 passed to function_declared_in_weak_mode() must be of the type integer, float given, called in %sstrict_call_weak_explicit.php on line 10 and defined in %sstrict_call_weak_explicit_2.inc:5 +Fatal error: Uncaught TypeError: Argument 1 passed to function_declared_in_weak_mode() must be of the type integer, float given, called in %sstrict_call_weak_explicit.php on line 10 and defined in %sstrict_call_weak_explicit_2.inc:5 Stack trace: #0 %s(%d): function_declared_in_weak_mode() #1 {main} diff --git a/Zend/tests/typehints/weak_include_strict.phpt b/Zend/tests/typehints/weak_include_strict.phpt index 4d91e7baa8f0a..5cd1895d66a51 100644 --- a/Zend/tests/typehints/weak_include_strict.phpt +++ b/Zend/tests/typehints/weak_include_strict.phpt @@ -11,7 +11,7 @@ require 'weak_include_strict_2.inc'; // calls within that file should stay strict, despite being included by weak file ?> --EXPECTF-- -Fatal error: Uncaught TypeException: Argument 1 passed to takes_int() must be of the type integer, float given, called in %sweak_include_strict_2.inc on line 9 and defined in %sweak_include_strict_2.inc:5 +Fatal error: Uncaught TypeError: Argument 1 passed to takes_int() must be of the type integer, float given, called in %sweak_include_strict_2.inc on line 9 and defined in %sweak_include_strict_2.inc:5 Stack trace: #0 %s(%d): takes_int() #1 %s(%d): require('%s') diff --git a/Zend/tests/use_const/no_global_fallback.phpt b/Zend/tests/use_const/no_global_fallback.phpt index 6db4be5d994b1..3adebd68f55de 100644 --- a/Zend/tests/use_const/no_global_fallback.phpt +++ b/Zend/tests/use_const/no_global_fallback.phpt @@ -10,7 +10,7 @@ var_dump(baz); ?> --EXPECTF-- -Fatal error: Uncaught EngineException: Undefined constant 'foo\bar\baz' in %s:%d +Fatal error: Uncaught Error: Undefined constant 'foo\bar\baz' in %s:%d Stack trace: #0 {main} thrown in %s on line %d diff --git a/Zend/tests/use_function/no_global_fallback.phpt b/Zend/tests/use_function/no_global_fallback.phpt index 2b57524a0ae65..1277d4e2c2ab7 100644 --- a/Zend/tests/use_function/no_global_fallback.phpt +++ b/Zend/tests/use_function/no_global_fallback.phpt @@ -10,7 +10,7 @@ var_dump(baz()); ?> --EXPECTF-- -Fatal error: Uncaught EngineException: Call to undefined function foo\bar\baz() in %s:%d +Fatal error: Uncaught Error: Call to undefined function foo\bar\baz() in %s:%d Stack trace: #0 {main} thrown in %s on line %d diff --git a/Zend/tests/use_function/no_global_fallback2.phpt b/Zend/tests/use_function/no_global_fallback2.phpt index 294e7e8697f44..cf6026f56a924 100644 --- a/Zend/tests/use_function/no_global_fallback2.phpt +++ b/Zend/tests/use_function/no_global_fallback2.phpt @@ -15,7 +15,7 @@ namespace foo { ?> --EXPECTF-- -Fatal error: Uncaught EngineException: Call to undefined function bar\test() in %s:%d +Fatal error: Uncaught Error: Call to undefined function bar\test() in %s:%d Stack trace: #0 {main} thrown in %s on line %d diff --git a/Zend/tests/varSyntax/method_call_on_string_literal.phpt b/Zend/tests/varSyntax/method_call_on_string_literal.phpt index 34760a24be646..40f48d1973736 100644 --- a/Zend/tests/varSyntax/method_call_on_string_literal.phpt +++ b/Zend/tests/varSyntax/method_call_on_string_literal.phpt @@ -5,7 +5,7 @@ Method call on string literal "string"->length(); ?> --EXPECTF-- -Fatal error: Uncaught EngineException: Call to a member function length() on string in %s:%d +Fatal error: Uncaught Error: Call to a member function length() on string in %s:%d Stack trace: #0 {main} thrown in %s on line %d diff --git a/Zend/tests/varSyntax/tempDimFetchByRefError.phpt b/Zend/tests/varSyntax/tempDimFetchByRefError.phpt index adf96013009d2..6a52acb99fe91 100644 --- a/Zend/tests/varSyntax/tempDimFetchByRefError.phpt +++ b/Zend/tests/varSyntax/tempDimFetchByRefError.phpt @@ -8,7 +8,7 @@ $fn([0, 1][0]); ?> --EXPECTF-- -Fatal error: Uncaught EngineException: Cannot use temporary expression in write context in %s:%d +Fatal error: Uncaught Error: Cannot use temporary expression in write context in %s:%d Stack trace: #0 {main} thrown in %s on line %d diff --git a/Zend/tests/varSyntax/tempPropFetchByRefError.phpt b/Zend/tests/varSyntax/tempPropFetchByRefError.phpt index eaba8ad2c6ebf..2f1b3a9cdba91 100644 --- a/Zend/tests/varSyntax/tempPropFetchByRefError.phpt +++ b/Zend/tests/varSyntax/tempPropFetchByRefError.phpt @@ -8,7 +8,7 @@ $fn([0, 1]->prop); ?> --EXPECTF-- -Fatal error: Uncaught EngineException: Cannot use temporary expression in write context in %s:%d +Fatal error: Uncaught Error: Cannot use temporary expression in write context in %s:%d Stack trace: #0 {main} thrown in %s on line %d diff --git a/Zend/tests/variadic/typehint_error.phpt b/Zend/tests/variadic/typehint_error.phpt index f901147dc5d5c..9f9a97bc569ee 100644 --- a/Zend/tests/variadic/typehint_error.phpt +++ b/Zend/tests/variadic/typehint_error.phpt @@ -33,7 +33,7 @@ array(3) { } } -Fatal error: Uncaught TypeException: Argument 3 passed to test() must be of the type array, integer given, called in %s:%d +Fatal error: Uncaught TypeError: Argument 3 passed to test() must be of the type array, integer given, called in %s:%d Stack trace: #0 %s(%d): test(Array, Array) #1 {main} diff --git a/ext/date/tests/014.phpt b/ext/date/tests/014.phpt index 02e990767433e..5cc31aa93ac92 100644 --- a/ext/date/tests/014.phpt +++ b/ext/date/tests/014.phpt @@ -37,7 +37,7 @@ Warning: timezone_offset_get() expects exactly 2 parameters, 0 given in %s on li bool(false) int(0) -Fatal error: Uncaught TypeException: Argument 1 passed to timezone_offset_get() must be an instance of DateTimeZone, instance of DateTime given in %s:%d +Fatal error: Uncaught TypeError: Argument 1 passed to timezone_offset_get() must be an instance of DateTimeZone, instance of DateTime given in %s:%d Stack trace: #0 %s(%d): timezone_offset_get(Object(DateTime), Object(DateTimeZone)) #1 {main} diff --git a/ext/dom/tests/DOMDocument_saveHTMLFile_error2.phpt b/ext/dom/tests/DOMDocument_saveHTMLFile_error2.phpt index c1ec685b2ce74..af0965c1c92a7 100644 --- a/ext/dom/tests/DOMDocument_saveHTMLFile_error2.phpt +++ b/ext/dom/tests/DOMDocument_saveHTMLFile_error2.phpt @@ -12,7 +12,7 @@ require_once dirname(__FILE__) .'/skipif.inc'; DOMDocument::saveHTMLFile(); ?> --EXPECTF-- -Fatal error: Uncaught EngineException: Non-static method DOMDocument::saveHTMLFile() cannot be called statically in %s:%d +Fatal error: Uncaught Error: Non-static method DOMDocument::saveHTMLFile() cannot be called statically in %s:%d Stack trace: #0 {main} thrown in %s on line %d diff --git a/ext/dom/tests/DOMDocument_saveHTML_error2.phpt b/ext/dom/tests/DOMDocument_saveHTML_error2.phpt index 41d190c07269e..e32e277803217 100644 --- a/ext/dom/tests/DOMDocument_saveHTML_error2.phpt +++ b/ext/dom/tests/DOMDocument_saveHTML_error2.phpt @@ -12,7 +12,7 @@ require_once dirname(__FILE__) .'/skipif.inc'; DOMDocument::saveHTML(true); ?> --EXPECTF-- -Fatal error: Uncaught EngineException: Non-static method DOMDocument::saveHTML() cannot be called statically in %s:%d +Fatal error: Uncaught Error: Non-static method DOMDocument::saveHTML() cannot be called statically in %s:%d Stack trace: #0 {main} thrown in %s on line %d diff --git a/ext/dom/tests/DOMDocument_validate_error2.phpt b/ext/dom/tests/DOMDocument_validate_error2.phpt index 901d541bf3eb0..08ec083fbb0c9 100644 --- a/ext/dom/tests/DOMDocument_validate_error2.phpt +++ b/ext/dom/tests/DOMDocument_validate_error2.phpt @@ -12,7 +12,7 @@ require_once dirname(__FILE__) .'/skipif.inc'; DOMDocument::validate(); ?> --EXPECTF-- -Fatal error: Uncaught EngineException: Non-static method DOMDocument::validate() cannot be called statically in %s:%d +Fatal error: Uncaught Error: Non-static method DOMDocument::validate() cannot be called statically in %s:%d Stack trace: #0 {main} thrown in %s on line %d diff --git a/ext/dom/tests/regsiter_node_class.phpt b/ext/dom/tests/regsiter_node_class.phpt index c2f062243830f..311433b12c31a 100644 --- a/ext/dom/tests/regsiter_node_class.phpt +++ b/ext/dom/tests/regsiter_node_class.phpt @@ -37,7 +37,7 @@ myAttribute HELLO Attribute DOMAttr -Fatal error: Uncaught EngineException: Call to undefined method DOMAttr::testit() in %s:25 +Fatal error: Uncaught Error: Call to undefined method DOMAttr::testit() in %s:25 Stack trace: #0 {main} thrown in %s on line 25 diff --git a/ext/intl/tests/breakiter___construct.phpt b/ext/intl/tests/breakiter___construct.phpt index 37303e583b6f6..10089e28a649c 100644 --- a/ext/intl/tests/breakiter___construct.phpt +++ b/ext/intl/tests/breakiter___construct.phpt @@ -11,7 +11,7 @@ ini_set("intl.error_level", E_WARNING); new IntlBreakIterator(); --EXPECTF-- -Fatal error: Uncaught EngineException: Call to private IntlBreakIterator::__construct() from invalid context in %s:%d +Fatal error: Uncaught Error: Call to private IntlBreakIterator::__construct() from invalid context in %s:%d Stack trace: #0 {main} thrown in %s on line %d diff --git a/ext/intl/tests/calendar_add_error.phpt b/ext/intl/tests/calendar_add_error.phpt index b9e9cdce63cfb..fc0584c61a465 100644 --- a/ext/intl/tests/calendar_add_error.phpt +++ b/ext/intl/tests/calendar_add_error.phpt @@ -38,7 +38,7 @@ Warning: intlcal_add() expects exactly 3 parameters, 4 given in %s on line %d Warning: intlcal_add(): intlcal_add: bad arguments in %s on line %d bool(false) -Fatal error: Uncaught TypeException: Argument 1 passed to intlcal_add() must be an instance of IntlCalendar, integer given in %s:%d +Fatal error: Uncaught TypeError: Argument 1 passed to intlcal_add() must be an instance of IntlCalendar, integer given in %s:%d Stack trace: #0 %s(%d): intlcal_add(1, 2, 3) #1 {main} diff --git a/ext/intl/tests/calendar_clear_error.phpt b/ext/intl/tests/calendar_clear_error.phpt index 13c6a5b51f38d..7e9c52b2a57d6 100644 --- a/ext/intl/tests/calendar_clear_error.phpt +++ b/ext/intl/tests/calendar_clear_error.phpt @@ -28,7 +28,7 @@ bool(false) Warning: intlcal_clear(): intlcal_clear: invalid field in %s on line %d bool(false) -Fatal error: Uncaught TypeException: Argument 1 passed to intlcal_clear() must be an instance of IntlCalendar, integer given in %s:%d +Fatal error: Uncaught TypeError: Argument 1 passed to intlcal_clear() must be an instance of IntlCalendar, integer given in %s:%d Stack trace: #0 %s(%d): intlcal_clear(1, 2) #1 {main} diff --git a/ext/intl/tests/calendar_fieldDifference_error.phpt b/ext/intl/tests/calendar_fieldDifference_error.phpt index beb81758be78e..f9d88d447bbc2 100644 --- a/ext/intl/tests/calendar_fieldDifference_error.phpt +++ b/ext/intl/tests/calendar_fieldDifference_error.phpt @@ -39,7 +39,7 @@ Warning: intlcal_field_difference() expects exactly 3 parameters, 4 given in %s Warning: intlcal_field_difference(): intlcal_field_difference: bad arguments in %s on line %d bool(false) -Fatal error: Uncaught TypeException: Argument 1 passed to intlcal_field_difference() must be an instance of IntlCalendar, integer given in %s:%d +Fatal error: Uncaught TypeError: Argument 1 passed to intlcal_field_difference() must be an instance of IntlCalendar, integer given in %s:%d Stack trace: #0 %s(%d): intlcal_field_difference(1, 0, 1) #1 {main} diff --git a/ext/intl/tests/calendar_getDayOfWeekType_error.phpt b/ext/intl/tests/calendar_getDayOfWeekType_error.phpt index 8ba0712e680a9..9d39666f060c1 100644 --- a/ext/intl/tests/calendar_getDayOfWeekType_error.phpt +++ b/ext/intl/tests/calendar_getDayOfWeekType_error.phpt @@ -41,7 +41,7 @@ Warning: intlcal_get_day_of_week_type() expects parameter 2 to be integer, strin Warning: intlcal_get_day_of_week_type(): intlcal_get_day_of_week_type: bad arguments in %s on line %d bool(false) -Fatal error: Uncaught TypeException: Argument 1 passed to intlcal_get_day_of_week_type() must be an instance of IntlCalendar, integer given in %s:%d +Fatal error: Uncaught TypeError: Argument 1 passed to intlcal_get_day_of_week_type() must be an instance of IntlCalendar, integer given in %s:%d Stack trace: #0 %s(%d): intlcal_get_day_of_week_type(1, 1) #1 {main} diff --git a/ext/intl/tests/calendar_getErrorCode_error.phpt b/ext/intl/tests/calendar_getErrorCode_error.phpt index 23fa9d67c47a9..97b7d9c0c1960 100644 --- a/ext/intl/tests/calendar_getErrorCode_error.phpt +++ b/ext/intl/tests/calendar_getErrorCode_error.phpt @@ -23,7 +23,7 @@ Warning: IntlCalendar::getErrorCode() expects exactly 0 parameters, 1 given in % Warning: IntlCalendar::getErrorCode(): intlcal_get_error_code: bad arguments in %s on line %d bool(false) -Fatal error: Uncaught TypeException: Argument 1 passed to intlcal_get_error_code() must be an instance of IntlCalendar, null given in %s:%d +Fatal error: Uncaught TypeError: Argument 1 passed to intlcal_get_error_code() must be an instance of IntlCalendar, null given in %s:%d Stack trace: #0 %s(%d): intlcal_get_error_code(NULL) #1 {main} diff --git a/ext/intl/tests/calendar_getErrorMessage_error.phpt b/ext/intl/tests/calendar_getErrorMessage_error.phpt index 69329e6db4948..5250bc064eee8 100644 --- a/ext/intl/tests/calendar_getErrorMessage_error.phpt +++ b/ext/intl/tests/calendar_getErrorMessage_error.phpt @@ -23,7 +23,7 @@ Warning: IntlCalendar::getErrorMessage() expects exactly 0 parameters, 1 given i Warning: IntlCalendar::getErrorMessage(): intlcal_get_error_message: bad arguments in %s on line %d bool(false) -Fatal error: Uncaught TypeException: Argument 1 passed to intlcal_get_error_message() must be an instance of IntlCalendar, null given in %s:%d +Fatal error: Uncaught TypeError: Argument 1 passed to intlcal_get_error_message() must be an instance of IntlCalendar, null given in %s:%d Stack trace: #0 %s(%d): intlcal_get_error_message(NULL) #1 {main} diff --git a/ext/intl/tests/calendar_getFirstDayOfWeek_error.phpt b/ext/intl/tests/calendar_getFirstDayOfWeek_error.phpt index 13beb5348ec94..3bae010c4a198 100644 --- a/ext/intl/tests/calendar_getFirstDayOfWeek_error.phpt +++ b/ext/intl/tests/calendar_getFirstDayOfWeek_error.phpt @@ -29,7 +29,7 @@ Warning: intlcal_get_first_day_of_week() expects exactly 1 parameter, 2 given in Warning: intlcal_get_first_day_of_week(): intlcal_get_first_day_of_week: bad arguments in %s on line %d bool(false) -Fatal error: Uncaught TypeException: Argument 1 passed to intlcal_get_first_day_of_week() must be an instance of IntlCalendar, integer given in %s:%d +Fatal error: Uncaught TypeError: Argument 1 passed to intlcal_get_first_day_of_week() must be an instance of IntlCalendar, integer given in %s:%d Stack trace: #0 %s(%d): intlcal_get_first_day_of_week(1) #1 {main} diff --git a/ext/intl/tests/calendar_getLocale_error.phpt b/ext/intl/tests/calendar_getLocale_error.phpt index 8c7a886caa768..47c62e3957599 100644 --- a/ext/intl/tests/calendar_getLocale_error.phpt +++ b/ext/intl/tests/calendar_getLocale_error.phpt @@ -39,7 +39,7 @@ Warning: intlcal_get_locale() expects exactly 2 parameters, 1 given in %s on lin Warning: intlcal_get_locale(): intlcal_get_locale: bad arguments in %s on line %d bool(false) -Fatal error: Uncaught TypeException: Argument 1 passed to intlcal_get_locale() must be an instance of IntlCalendar, integer given in %s:%d +Fatal error: Uncaught TypeError: Argument 1 passed to intlcal_get_locale() must be an instance of IntlCalendar, integer given in %s:%d Stack trace: #0 %s(%d): intlcal_get_locale(1) #1 {main} diff --git a/ext/intl/tests/calendar_getMinimalDaysInFirstWeek_error.phpt b/ext/intl/tests/calendar_getMinimalDaysInFirstWeek_error.phpt index 6ad098773e5ec..216363bec3ef6 100644 --- a/ext/intl/tests/calendar_getMinimalDaysInFirstWeek_error.phpt +++ b/ext/intl/tests/calendar_getMinimalDaysInFirstWeek_error.phpt @@ -29,7 +29,7 @@ Warning: intlcal_get_minimal_days_in_first_week() expects exactly 1 parameter, 2 Warning: intlcal_get_minimal_days_in_first_week(): intlcal_get_minimal_days_in_first_week: bad arguments in %s on line %d bool(false) -Fatal error: Uncaught TypeException: Argument 1 passed to intlcal_get_minimal_days_in_first_week() must be an instance of IntlCalendar, integer given in %s:%d +Fatal error: Uncaught TypeError: Argument 1 passed to intlcal_get_minimal_days_in_first_week() must be an instance of IntlCalendar, integer given in %s:%d Stack trace: #0 %s(%d): intlcal_get_minimal_days_in_first_week(1) #1 {main} diff --git a/ext/intl/tests/calendar_getSkipped_RepeatedWallTimeOption_error.phpt b/ext/intl/tests/calendar_getSkipped_RepeatedWallTimeOption_error.phpt index 403f6f7ebdb64..cb1ae4ea4b8c5 100644 --- a/ext/intl/tests/calendar_getSkipped_RepeatedWallTimeOption_error.phpt +++ b/ext/intl/tests/calendar_getSkipped_RepeatedWallTimeOption_error.phpt @@ -44,7 +44,7 @@ Warning: intlcal_get_repeated_wall_time_option() expects exactly 1 parameter, 2 Warning: intlcal_get_repeated_wall_time_option(): intlcal_get_repeated_wall_time_option: bad arguments in %s on line %d bool(false) -Fatal error: Uncaught TypeException: Argument 1 passed to intlcal_get_skipped_wall_time_option() must be an instance of IntlCalendar, integer given in %s:%d +Fatal error: Uncaught TypeError: Argument 1 passed to intlcal_get_skipped_wall_time_option() must be an instance of IntlCalendar, integer given in %s:%d Stack trace: #0 %s(%d): intlcal_get_skipped_wall_time_option(1) #1 {main} diff --git a/ext/intl/tests/calendar_getTimeZone_error.phpt b/ext/intl/tests/calendar_getTimeZone_error.phpt index 1eb8e00f758ec..15c1a50455aa7 100644 --- a/ext/intl/tests/calendar_getTimeZone_error.phpt +++ b/ext/intl/tests/calendar_getTimeZone_error.phpt @@ -29,7 +29,7 @@ Warning: intlcal_get_time_zone() expects exactly 1 parameter, 2 given in %s on l Warning: intlcal_get_time_zone(): intlcal_get_time_zone: bad arguments in %s on line %d bool(false) -Fatal error: Uncaught TypeException: Argument 1 passed to intlcal_get_time_zone() must be an instance of IntlCalendar, integer given in %s:%d +Fatal error: Uncaught TypeError: Argument 1 passed to intlcal_get_time_zone() must be an instance of IntlCalendar, integer given in %s:%d Stack trace: #0 %s(%d): intlcal_get_time_zone(1) #1 {main} diff --git a/ext/intl/tests/calendar_getTime_error.phpt b/ext/intl/tests/calendar_getTime_error.phpt index ed2687377ff0f..8c75ca5722301 100644 --- a/ext/intl/tests/calendar_getTime_error.phpt +++ b/ext/intl/tests/calendar_getTime_error.phpt @@ -28,7 +28,7 @@ Warning: intlcal_get_time() expects exactly 1 parameter, 2 given in %s on line % Warning: intlcal_get_time(): intlcal_get_time: bad arguments in %s on line %d bool(false) -Fatal error: Uncaught TypeException: Argument 1 passed to intlcal_get_time() must be an instance of IntlCalendar, integer given in %s:%d +Fatal error: Uncaught TypeError: Argument 1 passed to intlcal_get_time() must be an instance of IntlCalendar, integer given in %s:%d Stack trace: #0 %s(%d): intlcal_get_time(1) #1 {main} diff --git a/ext/intl/tests/calendar_getType_error.phpt b/ext/intl/tests/calendar_getType_error.phpt index e5333cb016223..95499a60acea9 100644 --- a/ext/intl/tests/calendar_getType_error.phpt +++ b/ext/intl/tests/calendar_getType_error.phpt @@ -29,7 +29,7 @@ Warning: intlcal_get_type() expects exactly 1 parameter, 2 given in %s on line % Warning: intlcal_get_type(): intlcal_get_type: bad arguments in %s on line %d bool(false) -Fatal error: Uncaught TypeException: Argument 1 passed to intlcal_get_type() must be an instance of IntlCalendar, integer given in %s:%d +Fatal error: Uncaught TypeError: Argument 1 passed to intlcal_get_type() must be an instance of IntlCalendar, integer given in %s:%d Stack trace: #0 %s(%d): intlcal_get_type(1) #1 {main} diff --git a/ext/intl/tests/calendar_getWeekendTransition_error.phpt b/ext/intl/tests/calendar_getWeekendTransition_error.phpt index 210735b2a0354..f77a60fc784f0 100644 --- a/ext/intl/tests/calendar_getWeekendTransition_error.phpt +++ b/ext/intl/tests/calendar_getWeekendTransition_error.phpt @@ -41,7 +41,7 @@ Warning: intlcal_get_weekend_transition() expects exactly 2 parameters, 1 given Warning: intlcal_get_weekend_transition(): intlcal_get_weekend_transition: bad arguments in %s on line %d bool(false) -Fatal error: Uncaught TypeException: Argument 1 passed to intlcal_get_weekend_transition() must be an instance of IntlCalendar, integer given in %s:%d +Fatal error: Uncaught TypeError: Argument 1 passed to intlcal_get_weekend_transition() must be an instance of IntlCalendar, integer given in %s:%d Stack trace: #0 %s(%d): intlcal_get_weekend_transition(1, 1) #1 {main} diff --git a/ext/intl/tests/calendar_inDaylightTime_error.phpt b/ext/intl/tests/calendar_inDaylightTime_error.phpt index 6d7ebcfeca101..1de9e2a830f90 100644 --- a/ext/intl/tests/calendar_inDaylightTime_error.phpt +++ b/ext/intl/tests/calendar_inDaylightTime_error.phpt @@ -29,7 +29,7 @@ Warning: intlcal_in_daylight_time() expects exactly 1 parameter, 2 given in %s o Warning: intlcal_in_daylight_time(): intlcal_in_daylight_time: bad arguments in %s on line %d bool(false) -Fatal error: Uncaught TypeException: Argument 1 passed to intlcal_in_daylight_time() must be an instance of IntlCalendar, integer given in %s:%d +Fatal error: Uncaught TypeError: Argument 1 passed to intlcal_in_daylight_time() must be an instance of IntlCalendar, integer given in %s:%d Stack trace: #0 %s(%d): intlcal_in_daylight_time(1) #1 {main} diff --git a/ext/intl/tests/calendar_isLenient_error.phpt b/ext/intl/tests/calendar_isLenient_error.phpt index 7a9d9f109c4dc..8cc8e969e7ce2 100644 --- a/ext/intl/tests/calendar_isLenient_error.phpt +++ b/ext/intl/tests/calendar_isLenient_error.phpt @@ -29,7 +29,7 @@ Warning: intlcal_is_lenient() expects exactly 1 parameter, 2 given in %s on line Warning: intlcal_is_lenient(): intlcal_is_lenient: bad arguments in %s on line %d bool(false) -Fatal error: Uncaught TypeException: Argument 1 passed to intlcal_is_lenient() must be an instance of IntlCalendar, integer given in %s:%d +Fatal error: Uncaught TypeError: Argument 1 passed to intlcal_is_lenient() must be an instance of IntlCalendar, integer given in %s:%d Stack trace: #0 %s(%d): intlcal_is_lenient(1) #1 {main} diff --git a/ext/intl/tests/calendar_isSet_error.phpt b/ext/intl/tests/calendar_isSet_error.phpt index c9497bea09935..a8efa34218294 100644 --- a/ext/intl/tests/calendar_isSet_error.phpt +++ b/ext/intl/tests/calendar_isSet_error.phpt @@ -39,7 +39,7 @@ Warning: intlcal_is_set() expects exactly 2 parameters, 1 given in %s on line %d Warning: intlcal_is_set(): intlcal_is_set: bad arguments in %s on line %d bool(false) -Fatal error: Uncaught TypeException: Argument 1 passed to intlcal_is_set() must be an instance of IntlCalendar, integer given in %s:%d +Fatal error: Uncaught TypeError: Argument 1 passed to intlcal_is_set() must be an instance of IntlCalendar, integer given in %s:%d Stack trace: #0 %s(%d): intlcal_is_set(1, 2) #1 {main} diff --git a/ext/intl/tests/calendar_isWeekend_error.phpt b/ext/intl/tests/calendar_isWeekend_error.phpt index 0538fa95ca6c6..8f723cc3c901b 100644 --- a/ext/intl/tests/calendar_isWeekend_error.phpt +++ b/ext/intl/tests/calendar_isWeekend_error.phpt @@ -35,7 +35,7 @@ Warning: intlcal_is_weekend() expects parameter 2 to be float, string given in % Warning: intlcal_is_weekend(): intlcal_is_weekend: bad arguments in %s on line %d bool(false) -Fatal error: Uncaught TypeException: Argument 1 passed to intlcal_is_weekend() must be an instance of IntlCalendar, integer given in %s:%d +Fatal error: Uncaught TypeError: Argument 1 passed to intlcal_is_weekend() must be an instance of IntlCalendar, integer given in %s:%d Stack trace: #0 %s(%d): intlcal_is_weekend(1) #1 {main} diff --git a/ext/intl/tests/calendar_roll_error.phpt b/ext/intl/tests/calendar_roll_error.phpt index a496089026ab4..2b8c303cbb350 100644 --- a/ext/intl/tests/calendar_roll_error.phpt +++ b/ext/intl/tests/calendar_roll_error.phpt @@ -34,7 +34,7 @@ bool(false) Warning: intlcal_roll(): intlcal_set: too many arguments in %s on line %d bool(false) -Fatal error: Uncaught TypeException: Argument 1 passed to intlcal_roll() must be an instance of IntlCalendar, integer given in %s:%d +Fatal error: Uncaught TypeError: Argument 1 passed to intlcal_roll() must be an instance of IntlCalendar, integer given in %s:%d Stack trace: #0 %s(%d): intlcal_roll(1, 2, 3) #1 {main} diff --git a/ext/intl/tests/calendar_setFirstDayOfWeek_error.phpt b/ext/intl/tests/calendar_setFirstDayOfWeek_error.phpt index 8d24a61d6bbf0..466690dbee2c6 100644 --- a/ext/intl/tests/calendar_setFirstDayOfWeek_error.phpt +++ b/ext/intl/tests/calendar_setFirstDayOfWeek_error.phpt @@ -37,7 +37,7 @@ bool(false) Warning: intlcal_set_first_day_of_week(): intlcal_set_first_day_of_week: invalid day of week in %s on line %d bool(false) -Fatal error: Uncaught TypeException: Argument 1 passed to intlcal_set_first_day_of_week() must be an instance of IntlCalendar, integer given in %s:%d +Fatal error: Uncaught TypeError: Argument 1 passed to intlcal_set_first_day_of_week() must be an instance of IntlCalendar, integer given in %s:%d Stack trace: #0 %s(%d): intlcal_set_first_day_of_week(1, 2) #1 {main} diff --git a/ext/intl/tests/calendar_setLenient_error.phpt b/ext/intl/tests/calendar_setLenient_error.phpt index a1516b9c0ea0b..9619dc564c3d4 100644 --- a/ext/intl/tests/calendar_setLenient_error.phpt +++ b/ext/intl/tests/calendar_setLenient_error.phpt @@ -41,7 +41,7 @@ Warning: intlcal_set_lenient() expects parameter 2 to be boolean, array given in Warning: intlcal_set_lenient(): intlcal_set_lenient: bad arguments in %s on line %d bool(false) -Fatal error: Uncaught TypeException: Argument 1 passed to intlcal_set_lenient() must be an instance of IntlCalendar, integer given in %s:%d +Fatal error: Uncaught TypeError: Argument 1 passed to intlcal_set_lenient() must be an instance of IntlCalendar, integer given in %s:%d Stack trace: #0 %s(%d): intlcal_set_lenient(1, false) #1 {main} diff --git a/ext/intl/tests/calendar_setMinimalDaysInFirstWeek_error.phpt b/ext/intl/tests/calendar_setMinimalDaysInFirstWeek_error.phpt index 406eebd356a75..ee88f6d63092e 100644 --- a/ext/intl/tests/calendar_setMinimalDaysInFirstWeek_error.phpt +++ b/ext/intl/tests/calendar_setMinimalDaysInFirstWeek_error.phpt @@ -36,7 +36,7 @@ bool(false) Warning: intlcal_set_minimal_days_in_first_week(): intlcal_set_minimal_days_in_first_week: invalid number of days; must be between 1 and 7 in %s on line %d bool(false) -Fatal error: Uncaught TypeException: Argument 1 passed to intlcal_set_minimal_days_in_first_week() must be an instance of IntlCalendar, integer given in %s:%d +Fatal error: Uncaught TypeError: Argument 1 passed to intlcal_set_minimal_days_in_first_week() must be an instance of IntlCalendar, integer given in %s:%d Stack trace: #0 %s(%d): intlcal_set_minimal_days_in_first_week(1, 2) #1 {main} diff --git a/ext/intl/tests/calendar_setSkipped_RepeatedWallTimeOption_error.phpt b/ext/intl/tests/calendar_setSkipped_RepeatedWallTimeOption_error.phpt index fa26ef3491b8d..27f6215d52c2b 100644 --- a/ext/intl/tests/calendar_setSkipped_RepeatedWallTimeOption_error.phpt +++ b/ext/intl/tests/calendar_setSkipped_RepeatedWallTimeOption_error.phpt @@ -79,7 +79,7 @@ Warning: intlcal_set_repeated_wall_time_option() expects exactly 2 parameters, 1 Warning: intlcal_set_repeated_wall_time_option(): intlcal_set_repeated_wall_time_option: bad arguments in %s on line %d bool(false) -Fatal error: Uncaught TypeException: Argument 1 passed to intlcal_set_repeated_wall_time_option() must be an instance of IntlCalendar, integer given in %s:%d +Fatal error: Uncaught TypeError: Argument 1 passed to intlcal_set_repeated_wall_time_option() must be an instance of IntlCalendar, integer given in %s:%d Stack trace: #0 %s(%d): intlcal_set_repeated_wall_time_option(1, 1) #1 {main} diff --git a/ext/intl/tests/calendar_setTime_error.phpt b/ext/intl/tests/calendar_setTime_error.phpt index e086d77470c86..00bb7eb91da1a 100644 --- a/ext/intl/tests/calendar_setTime_error.phpt +++ b/ext/intl/tests/calendar_setTime_error.phpt @@ -34,7 +34,7 @@ Warning: intlcal_set_time() expects exactly 2 parameters, 3 given in %s on line Warning: intlcal_set_time(): intlcal_set_time: bad arguments in %s on line %d bool(false) -Fatal error: Uncaught TypeException: Argument 1 passed to intlcal_set_time() must be an instance of IntlCalendar, integer given in %s:%d +Fatal error: Uncaught TypeError: Argument 1 passed to intlcal_set_time() must be an instance of IntlCalendar, integer given in %s:%d Stack trace: #0 %s(%d): intlcal_set_time(1) #1 {main} diff --git a/ext/intl/tests/calendar_set_error.phpt b/ext/intl/tests/calendar_set_error.phpt index ecbc822e55128..c232b5640a98a 100644 --- a/ext/intl/tests/calendar_set_error.phpt +++ b/ext/intl/tests/calendar_set_error.phpt @@ -38,7 +38,7 @@ bool(false) Warning: intlcal_set(): intlcal_set: invalid field in %s on line %d bool(false) -Fatal error: Uncaught TypeException: Argument 1 passed to intlcal_set() must be an instance of IntlCalendar, integer given in %s:%d +Fatal error: Uncaught TypeError: Argument 1 passed to intlcal_set() must be an instance of IntlCalendar, integer given in %s:%d Stack trace: #0 %s(%d): intlcal_set(1, 2, 3) #1 {main} diff --git a/ext/intl/tests/calendar_toDateTime_error.phpt b/ext/intl/tests/calendar_toDateTime_error.phpt index a4b7bc38074ff..3d3ada22b9521 100644 --- a/ext/intl/tests/calendar_toDateTime_error.phpt +++ b/ext/intl/tests/calendar_toDateTime_error.phpt @@ -38,7 +38,7 @@ bool(false) Warning: IntlCalendar::toDateTime(): intlcal_to_date_time: DateTimeZone constructor threw exception in %s on line %d string(77) "exception: DateTimeZone::__construct(): Unknown or bad timezone (Etc/Unknown)" -Fatal error: Uncaught TypeException: Argument 1 passed to intlcal_to_date_time() must be an instance of IntlCalendar, integer given in %s:%d +Fatal error: Uncaught TypeError: Argument 1 passed to intlcal_to_date_time() must be an instance of IntlCalendar, integer given in %s:%d Stack trace: #0 %s(%d): intlcal_to_date_time(3) #1 {main} diff --git a/ext/intl/tests/gregoriancalendar_getGregorianChange_error.phpt b/ext/intl/tests/gregoriancalendar_getGregorianChange_error.phpt index 59d74aca1e69b..dd37788dd1111 100644 --- a/ext/intl/tests/gregoriancalendar_getGregorianChange_error.phpt +++ b/ext/intl/tests/gregoriancalendar_getGregorianChange_error.phpt @@ -27,7 +27,7 @@ Warning: intlgregcal_get_gregorian_change() expects exactly 1 parameter, 2 given Warning: intlgregcal_get_gregorian_change(): intlgregcal_get_gregorian_change: bad arguments in %s on line %d bool(false) -Fatal error: Uncaught TypeException: Argument 1 passed to intlgregcal_get_gregorian_change() must be an instance of IntlGregorianCalendar, integer given in %s:%d +Fatal error: Uncaught TypeError: Argument 1 passed to intlgregcal_get_gregorian_change() must be an instance of IntlGregorianCalendar, integer given in %s:%d Stack trace: #0 %s(%d): intlgregcal_get_gregorian_change(1) #1 {main} diff --git a/ext/intl/tests/gregoriancalendar_isLeapYear_error.phpt b/ext/intl/tests/gregoriancalendar_isLeapYear_error.phpt index 04b047dd20fb1..6c4803c68c2eb 100644 --- a/ext/intl/tests/gregoriancalendar_isLeapYear_error.phpt +++ b/ext/intl/tests/gregoriancalendar_isLeapYear_error.phpt @@ -45,7 +45,7 @@ Warning: intlgregcal_is_leap_year() expects exactly 2 parameters, 1 given in %s Warning: intlgregcal_is_leap_year(): intlgregcal_is_leap_year: bad arguments in %s on line %d bool(false) -Fatal error: Uncaught TypeException: Argument 1 passed to intlgregcal_is_leap_year() must be an instance of IntlGregorianCalendar, integer given in %s:%d +Fatal error: Uncaught TypeError: Argument 1 passed to intlgregcal_is_leap_year() must be an instance of IntlGregorianCalendar, integer given in %s:%d Stack trace: #0 %s(%d): intlgregcal_is_leap_year(1, 2) #1 {main} diff --git a/ext/intl/tests/gregoriancalendar_setGregorianChange_error.phpt b/ext/intl/tests/gregoriancalendar_setGregorianChange_error.phpt index df74807ca8e09..f45672c178dfa 100644 --- a/ext/intl/tests/gregoriancalendar_setGregorianChange_error.phpt +++ b/ext/intl/tests/gregoriancalendar_setGregorianChange_error.phpt @@ -39,7 +39,7 @@ Warning: intlgregcal_set_gregorian_change() expects exactly 2 parameters, 1 give Warning: intlgregcal_set_gregorian_change(): intlgregcal_set_gregorian_change: bad arguments in %s on line %d bool(false) -Fatal error: Uncaught TypeException: Argument 1 passed to intlgregcal_set_gregorian_change() must be an instance of IntlGregorianCalendar, integer given in %s:%d +Fatal error: Uncaught TypeError: Argument 1 passed to intlgregcal_set_gregorian_change() must be an instance of IntlGregorianCalendar, integer given in %s:%d Stack trace: #0 %s(%d): intlgregcal_set_gregorian_change(1, 4) #1 {main} diff --git a/ext/intl/tests/timezone_getCanonicalID_error.phpt b/ext/intl/tests/timezone_getCanonicalID_error.phpt index b0a45bceafe5f..e268e216a81d9 100644 --- a/ext/intl/tests/timezone_getCanonicalID_error.phpt +++ b/ext/intl/tests/timezone_getCanonicalID_error.phpt @@ -29,7 +29,7 @@ bool(false) Warning: IntlTimeZone::getCanonicalID(): intltz_get_canonical_id: could not convert time zone id to UTF-16 in %s on line %d bool(false) -Fatal error: Uncaught EngineException: Cannot pass parameter 2 by reference in %s:%d +Fatal error: Uncaught Error: Cannot pass parameter 2 by reference in %s:%d Stack trace: #0 {main} thrown in %s on line %d diff --git a/ext/intl/tests/timezone_getDSTSavings_error.phpt b/ext/intl/tests/timezone_getDSTSavings_error.phpt index 5d9a1a2fc3670..26526dc72ec52 100644 --- a/ext/intl/tests/timezone_getDSTSavings_error.phpt +++ b/ext/intl/tests/timezone_getDSTSavings_error.phpt @@ -20,7 +20,7 @@ Warning: IntlTimeZone::getDSTSavings() expects exactly 0 parameters, 1 given in Warning: IntlTimeZone::getDSTSavings(): intltz_get_dst_savings: bad arguments in %s on line %d bool(false) -Fatal error: Uncaught TypeException: Argument 1 passed to intltz_get_dst_savings() must be an instance of IntlTimeZone, null given in %s:%d +Fatal error: Uncaught TypeError: Argument 1 passed to intltz_get_dst_savings() must be an instance of IntlTimeZone, null given in %s:%d Stack trace: #0 %s(%d): intltz_get_dst_savings(NULL) #1 {main} diff --git a/ext/intl/tests/timezone_getDisplayName_error.phpt b/ext/intl/tests/timezone_getDisplayName_error.phpt index 89e77b5614cf0..4089c42e3c489 100644 --- a/ext/intl/tests/timezone_getDisplayName_error.phpt +++ b/ext/intl/tests/timezone_getDisplayName_error.phpt @@ -42,7 +42,7 @@ Warning: IntlTimeZone::getDisplayName() expects at most 3 parameters, 4 given in Warning: IntlTimeZone::getDisplayName(): intltz_get_display_name: bad arguments in %s on line %d bool(false) -Fatal error: Uncaught TypeException: Argument 1 passed to intltz_get_display_name() must be an instance of IntlTimeZone, null given in %s:%d +Fatal error: Uncaught TypeError: Argument 1 passed to intltz_get_display_name() must be an instance of IntlTimeZone, null given in %s:%d Stack trace: #0 %s(%d): intltz_get_display_name(NULL, 1, false, 'pt_PT') #1 {main} diff --git a/ext/intl/tests/timezone_getErrorCode_error.phpt b/ext/intl/tests/timezone_getErrorCode_error.phpt index 5d5f4d74a3cc8..a6d704c03543d 100644 --- a/ext/intl/tests/timezone_getErrorCode_error.phpt +++ b/ext/intl/tests/timezone_getErrorCode_error.phpt @@ -20,7 +20,7 @@ Warning: IntlTimeZone::getErrorCode() expects exactly 0 parameters, 1 given in % Warning: IntlTimeZone::getErrorCode(): intltz_get_error_code: bad arguments in %s on line %d bool(false) -Fatal error: Uncaught TypeException: Argument 1 passed to intltz_get_error_code() must be an instance of IntlTimeZone, null given in %s:%d +Fatal error: Uncaught TypeError: Argument 1 passed to intltz_get_error_code() must be an instance of IntlTimeZone, null given in %s:%d Stack trace: #0 %s(%d): intltz_get_error_code(NULL) #1 {main} diff --git a/ext/intl/tests/timezone_getErrorMessage_error.phpt b/ext/intl/tests/timezone_getErrorMessage_error.phpt index 9a71ea4aacea4..2f7cfcfe2afba 100644 --- a/ext/intl/tests/timezone_getErrorMessage_error.phpt +++ b/ext/intl/tests/timezone_getErrorMessage_error.phpt @@ -20,7 +20,7 @@ Warning: IntlTimeZone::getErrorMessage() expects exactly 0 parameters, 1 given i Warning: IntlTimeZone::getErrorMessage(): intltz_get_error_message: bad arguments in %s on line %d bool(false) -Fatal error: Uncaught TypeException: Argument 1 passed to intltz_get_error_message() must be an instance of IntlTimeZone, null given in %s:%d +Fatal error: Uncaught TypeError: Argument 1 passed to intltz_get_error_message() must be an instance of IntlTimeZone, null given in %s:%d Stack trace: #0 %s(%d): intltz_get_error_message(NULL) #1 {main} diff --git a/ext/intl/tests/timezone_getID_error.phpt b/ext/intl/tests/timezone_getID_error.phpt index 36932e1f8d905..a08c506cee821 100644 --- a/ext/intl/tests/timezone_getID_error.phpt +++ b/ext/intl/tests/timezone_getID_error.phpt @@ -20,7 +20,7 @@ Warning: IntlTimeZone::getID() expects exactly 0 parameters, 1 given in %s on li Warning: IntlTimeZone::getID(): intltz_get_id: bad arguments in %s on line %d bool(false) -Fatal error: Uncaught TypeException: Argument 1 passed to intltz_get_id() must be an instance of IntlTimeZone, null given in %s:%d +Fatal error: Uncaught TypeError: Argument 1 passed to intltz_get_id() must be an instance of IntlTimeZone, null given in %s:%d Stack trace: #0 %s(%d): intltz_get_id(NULL) #1 {main} diff --git a/ext/intl/tests/timezone_getOffset_error.phpt b/ext/intl/tests/timezone_getOffset_error.phpt index d87c2aab32714..632fa5e85a517 100644 --- a/ext/intl/tests/timezone_getOffset_error.phpt +++ b/ext/intl/tests/timezone_getOffset_error.phpt @@ -30,7 +30,7 @@ Warning: IntlTimeZone::getOffset() expects exactly 4 parameters, 5 given in %s o Warning: IntlTimeZone::getOffset(): intltz_get_offset: bad arguments in %s on line %d bool(false) -Fatal error: Uncaught TypeException: Argument 1 passed to intltz_get_offset() must be an instance of IntlTimeZone, null given in %s:%d +Fatal error: Uncaught TypeError: Argument 1 passed to intltz_get_offset() must be an instance of IntlTimeZone, null given in %s:%d Stack trace: #0 %s(%d): intltz_get_offset(NULL, %d, false, NULL, NULL) #1 {main} diff --git a/ext/intl/tests/timezone_getRawOffset_error.phpt b/ext/intl/tests/timezone_getRawOffset_error.phpt index 80f8ce01d2303..1015ef4ddc63a 100644 --- a/ext/intl/tests/timezone_getRawOffset_error.phpt +++ b/ext/intl/tests/timezone_getRawOffset_error.phpt @@ -20,7 +20,7 @@ Warning: IntlTimeZone::getRawOffset() expects exactly 0 parameters, 1 given in % Warning: IntlTimeZone::getRawOffset(): intltz_get_raw_offset: bad arguments in %s on line %d bool(false) -Fatal error: Uncaught TypeException: Argument 1 passed to intltz_get_raw_offset() must be an instance of IntlTimeZone, null given in %s:%d +Fatal error: Uncaught TypeError: Argument 1 passed to intltz_get_raw_offset() must be an instance of IntlTimeZone, null given in %s:%d Stack trace: #0 %s(%d): intltz_get_raw_offset(NULL) #1 {main} diff --git a/ext/intl/tests/timezone_toDateTimeZone_error.phpt b/ext/intl/tests/timezone_toDateTimeZone_error.phpt index d0a9e7311703c..ecc5e2bef83ce 100644 --- a/ext/intl/tests/timezone_toDateTimeZone_error.phpt +++ b/ext/intl/tests/timezone_toDateTimeZone_error.phpt @@ -35,7 +35,7 @@ Warning: intltz_to_date_time_zone() expects exactly 1 parameter, 0 given in %s o Warning: intltz_to_date_time_zone(): intltz_to_date_time_zone: bad arguments in %s on line %d bool(false) -Fatal error: Uncaught TypeException: Argument 1 passed to intltz_to_date_time_zone() must be an instance of IntlTimeZone, integer given in %s:%d +Fatal error: Uncaught TypeError: Argument 1 passed to intltz_to_date_time_zone() must be an instance of IntlTimeZone, integer given in %s:%d Stack trace: #0 %s(%d): intltz_to_date_time_zone(1) #1 {main} diff --git a/ext/intl/tests/timezone_useDaylightTime_error.phpt b/ext/intl/tests/timezone_useDaylightTime_error.phpt index ab63d7a428dee..d3f9471671ca1 100644 --- a/ext/intl/tests/timezone_useDaylightTime_error.phpt +++ b/ext/intl/tests/timezone_useDaylightTime_error.phpt @@ -19,7 +19,7 @@ Warning: IntlTimeZone::useDaylightTime() expects exactly 0 parameters, 1 given i Warning: IntlTimeZone::useDaylightTime(): intltz_use_daylight_time: bad arguments in %s on line %d bool(false) -Fatal error: Uncaught TypeException: Argument 1 passed to intltz_use_daylight_time() must be an instance of IntlTimeZone, null given in %s:%d +Fatal error: Uncaught TypeError: Argument 1 passed to intltz_use_daylight_time() must be an instance of IntlTimeZone, null given in %s:%d Stack trace: #0 %s(%d): intltz_use_daylight_time(NULL) #1 {main} diff --git a/ext/intl/tests/transliterator_create_inverse_error.phpt b/ext/intl/tests/transliterator_create_inverse_error.phpt index bebb3c44c6db0..ca3de096da5e6 100644 --- a/ext/intl/tests/transliterator_create_inverse_error.phpt +++ b/ext/intl/tests/transliterator_create_inverse_error.phpt @@ -18,7 +18,7 @@ Warning: Transliterator::createInverse() expects exactly 0 parameters, 1 given i Warning: Transliterator::createInverse(): transliterator_create_inverse: bad arguments in %s on line %d -Fatal error: Uncaught TypeException: Argument 1 passed to transliterator_create_inverse() must be an instance of Transliterator, string given in %s:%d +Fatal error: Uncaught TypeError: Argument 1 passed to transliterator_create_inverse() must be an instance of Transliterator, string given in %s:%d Stack trace: #0 %s(%d): transliterator_create_inverse('jj') #1 {main} diff --git a/ext/intl/tests/transliterator_get_error_code_error.phpt b/ext/intl/tests/transliterator_get_error_code_error.phpt index f2a0c7dabce39..d65fea9904572 100644 --- a/ext/intl/tests/transliterator_get_error_code_error.phpt +++ b/ext/intl/tests/transliterator_get_error_code_error.phpt @@ -21,7 +21,7 @@ Warning: Transliterator::getErrorCode() expects exactly 0 parameters, 1 given in Warning: Transliterator::getErrorCode(): transliterator_get_error_code: unable to parse input params in %s on line %d -Fatal error: Uncaught TypeException: Argument 1 passed to transliterator_get_error_code() must be an instance of Transliterator, array given in %s:%d +Fatal error: Uncaught TypeError: Argument 1 passed to transliterator_get_error_code() must be an instance of Transliterator, array given in %s:%d Stack trace: #0 %s(%d): transliterator_get_error_code(Array) #1 {main} diff --git a/ext/intl/tests/transliterator_get_error_message_error.phpt b/ext/intl/tests/transliterator_get_error_message_error.phpt index 8f8f0be9f96fc..a6129ea271af2 100644 --- a/ext/intl/tests/transliterator_get_error_message_error.phpt +++ b/ext/intl/tests/transliterator_get_error_message_error.phpt @@ -21,7 +21,7 @@ Warning: Transliterator::getErrorMessage() expects exactly 0 parameters, 1 given Warning: Transliterator::getErrorMessage(): transliterator_get_error_message: unable to parse input params in %s on line %d -Fatal error: Uncaught TypeException: Argument 1 passed to transliterator_get_error_message() must be an instance of Transliterator, array given in %s:%d +Fatal error: Uncaught TypeError: Argument 1 passed to transliterator_get_error_message() must be an instance of Transliterator, array given in %s:%d Stack trace: #0 %s(%d): transliterator_get_error_message(Array) #1 {main} diff --git a/ext/mysqli/tests/bug33491.phpt b/ext/mysqli/tests/bug33491.phpt index ff9518f220b2b..6500241760ebd 100644 --- a/ext/mysqli/tests/bug33491.phpt +++ b/ext/mysqli/tests/bug33491.phpt @@ -26,7 +26,7 @@ $DB->query_single('SELECT DATE()'); ?> --EXPECTF-- -Fatal error: Uncaught EngineException: Call to a member function fetch_row() on boolean in %sbug33491.php:%d +Fatal error: Uncaught Error: Call to a member function fetch_row() on boolean in %sbug33491.php:%d Stack trace: #0 %s(%d): DB->query_single('SELECT DATE()') #1 {main} diff --git a/ext/mysqli/tests/bug38003.phpt b/ext/mysqli/tests/bug38003.phpt index 7158cec30a162..a5f1a23bb5644 100644 --- a/ext/mysqli/tests/bug38003.phpt +++ b/ext/mysqli/tests/bug38003.phpt @@ -17,7 +17,7 @@ $DB = new DB(); echo "Done\n"; ?> --EXPECTF-- -Fatal error: Uncaught EngineException: Call to private DB::__construct() from invalid context in %s:%d +Fatal error: Uncaught Error: Call to private DB::__construct() from invalid context in %s:%d Stack trace: #0 {main} thrown in %s on line %d diff --git a/ext/mysqli/tests/mysqli_driver_unclonable.phpt b/ext/mysqli/tests/mysqli_driver_unclonable.phpt index 316e351dc45ae..e761d065324a5 100644 --- a/ext/mysqli/tests/mysqli_driver_unclonable.phpt +++ b/ext/mysqli/tests/mysqli_driver_unclonable.phpt @@ -10,7 +10,7 @@ Trying to clone mysqli_driver object print "done!"; ?> --EXPECTF-- -Fatal error: Uncaught EngineException: Trying to clone an uncloneable object of class mysqli_driver in %s:%d +Fatal error: Uncaught Error: Trying to clone an uncloneable object of class mysqli_driver in %s:%d Stack trace: #0 {main} thrown in %s on line %d \ No newline at end of file diff --git a/ext/mysqli/tests/mysqli_fetch_object_no_constructor.phpt b/ext/mysqli/tests/mysqli_fetch_object_no_constructor.phpt index 52941ad6b1f95..3a047a50fcccd 100644 --- a/ext/mysqli/tests/mysqli_fetch_object_no_constructor.phpt +++ b/ext/mysqli/tests/mysqli_fetch_object_no_constructor.phpt @@ -62,7 +62,7 @@ Exception: Class mysqli_fetch_object_test does not have a constructor hence you Fatal error with PHP (but no exception!): -Fatal error: Uncaught EngineException: Call to undefined method mysqli_fetch_object_test::mysqli_fetch_object_test() in %s:%d +Fatal error: Uncaught Error: Call to undefined method mysqli_fetch_object_test::mysqli_fetch_object_test() in %s:%d Stack trace: #0 {main} thrown in %s on line %d diff --git a/ext/mysqli/tests/mysqli_result_unclonable.phpt b/ext/mysqli/tests/mysqli_result_unclonable.phpt index d409ba3bbfcb5..6164197a6c371 100644 --- a/ext/mysqli/tests/mysqli_result_unclonable.phpt +++ b/ext/mysqli/tests/mysqli_result_unclonable.phpt @@ -21,7 +21,7 @@ require_once('skipifconnectfailure.inc'); print "done!"; ?> --EXPECTF-- -Fatal error: Uncaught EngineException: Trying to clone an uncloneable object of class mysqli_result in %s:%d +Fatal error: Uncaught Error: Trying to clone an uncloneable object of class mysqli_result in %s:%d Stack trace: #0 {main} thrown in %s on line %d \ No newline at end of file diff --git a/ext/mysqli/tests/mysqli_stmt_unclonable.phpt b/ext/mysqli/tests/mysqli_stmt_unclonable.phpt index b2d7dead7a02d..6576c15d9028b 100644 --- a/ext/mysqli/tests/mysqli_stmt_unclonable.phpt +++ b/ext/mysqli/tests/mysqli_stmt_unclonable.phpt @@ -22,7 +22,7 @@ require_once('skipifconnectfailure.inc'); print "done!"; ?> --EXPECTF-- -Fatal error: Uncaught EngineException: Trying to clone an uncloneable object of class mysqli_stmt in %s:%d +Fatal error: Uncaught Error: Trying to clone an uncloneable object of class mysqli_stmt in %s:%d Stack trace: #0 {main} thrown in %s on line %d \ No newline at end of file diff --git a/ext/mysqli/tests/mysqli_unclonable.phpt b/ext/mysqli/tests/mysqli_unclonable.phpt index 2ce91584aabed..f4471bf831be0 100644 --- a/ext/mysqli/tests/mysqli_unclonable.phpt +++ b/ext/mysqli/tests/mysqli_unclonable.phpt @@ -20,7 +20,7 @@ require_once('skipifconnectfailure.inc'); print "done!"; ?> --EXPECTF-- -Fatal error: Uncaught EngineException: Trying to clone an uncloneable object of class mysqli in %s:%d +Fatal error: Uncaught Error: Trying to clone an uncloneable object of class mysqli in %s:%d Stack trace: #0 {main} thrown in %s on line %d \ No newline at end of file diff --git a/ext/pdo/tests/bug47769.phpt b/ext/pdo/tests/bug47769.phpt index 12a5e00d1101f..b0b38325d17d0 100644 --- a/ext/pdo/tests/bug47769.phpt +++ b/ext/pdo/tests/bug47769.phpt @@ -34,7 +34,7 @@ this is a protected method. this is a private method. foo -Fatal error: Uncaught EngineException: Call to protected method test::isProtected() from context '' in %s:%d +Fatal error: Uncaught Error: Call to protected method test::isProtected() from context '' in %s:%d Stack trace: #0 {main} thrown in %s on line %d diff --git a/ext/pdo/tests/pdo_025.phpt b/ext/pdo/tests/pdo_025.phpt index 5083b847080ec..de6f0ad841f85 100644 --- a/ext/pdo/tests/pdo_025.phpt +++ b/ext/pdo/tests/pdo_025.phpt @@ -110,7 +110,7 @@ object(Test)#%d (3) { } ===FAIL=== -Fatal error: Uncaught EngineException: Cannot access protected property Fail::$id in %spdo_025.php:%d +Fatal error: Uncaught Error: Cannot access protected property Fail::$id in %spdo_025.php:%d Stack trace: #0 {main} thrown in %spdo_025.php on line %d diff --git a/ext/pdo/tests/pdo_037.phpt b/ext/pdo/tests/pdo_037.phpt index 3d9bc59dd07e3..fb4c5e1e83ded 100644 --- a/ext/pdo/tests/pdo_037.phpt +++ b/ext/pdo/tests/pdo_037.phpt @@ -16,7 +16,7 @@ var_dump($obj->foo()); ?> --EXPECTF-- -Fatal error: Uncaught EngineException: Call to undefined method MyStatement::foo() in %s:%d +Fatal error: Uncaught Error: Call to undefined method MyStatement::foo() in %s:%d Stack trace: #0 {main} thrown in %s on line %d diff --git a/ext/pdo_mysql/tests/bug_37445.phpt b/ext/pdo_mysql/tests/bug_37445.phpt index 241c3f84e8551..c9400717b4b5d 100644 --- a/ext/pdo_mysql/tests/bug_37445.phpt +++ b/ext/pdo_mysql/tests/bug_37445.phpt @@ -17,7 +17,7 @@ $stmt = $db->prepare("SELECT 1"); $stmt->bindParam(':a', 'b'); ?> --EXPECTF-- -Fatal error: Uncaught EngineException: Cannot pass parameter 2 by reference in %sbug_37445.php:%d +Fatal error: Uncaught Error: Cannot pass parameter 2 by reference in %sbug_37445.php:%d Stack trace: #0 {main} thrown in %sbug_37445.php on line %d diff --git a/ext/pdo_mysql/tests/pdo_mysql_attr_statement_class.phpt b/ext/pdo_mysql/tests/pdo_mysql_attr_statement_class.phpt index b31ad352b48e6..fb336ba627caf 100644 --- a/ext/pdo_mysql/tests/pdo_mysql_attr_statement_class.phpt +++ b/ext/pdo_mysql/tests/pdo_mysql_attr_statement_class.phpt @@ -152,7 +152,7 @@ array(1) { } } -Fatal error: Uncaught EngineException: Cannot instantiate abstract class mystatement6 in %s:%d +Fatal error: Uncaught Error: Cannot instantiate abstract class mystatement6 in %s:%d Stack trace: #0 %s(%d): PDO->query('SELECT id, labe...') #1 {main} diff --git a/ext/pdo_mysql/tests/pdo_mysql_prepare_native_clear_error.phpt b/ext/pdo_mysql/tests/pdo_mysql_prepare_native_clear_error.phpt index 207672334451f..140359afc10df 100644 --- a/ext/pdo_mysql/tests/pdo_mysql_prepare_native_clear_error.phpt +++ b/ext/pdo_mysql/tests/pdo_mysql_prepare_native_clear_error.phpt @@ -93,7 +93,7 @@ array(1) { Warning: PDO::prepare(): SQLSTATE[42S22]: Column not found: 1054 Unknown column 'unknown_column' in 'field list' in %s on line %d -Fatal error: Uncaught EngineException: Call to a member function execute() on boolean in %s:%d +Fatal error: Uncaught Error: Call to a member function execute() on boolean in %s:%d Stack trace: #0 {main} thrown in %s on line %d diff --git a/ext/pdo_mysql/tests/pdo_mysql_prepare_native_mixed_style.phpt b/ext/pdo_mysql/tests/pdo_mysql_prepare_native_mixed_style.phpt index 66ee0eedc9132..ad710dcc1562d 100644 --- a/ext/pdo_mysql/tests/pdo_mysql_prepare_native_mixed_style.phpt +++ b/ext/pdo_mysql/tests/pdo_mysql_prepare_native_mixed_style.phpt @@ -36,7 +36,7 @@ Warning: PDO::prepare(): SQLSTATE[HY093]: Invalid parameter number: mixed named Warning: PDO::prepare(): SQLSTATE[HY093]: Invalid parameter number in %s on line %d -Fatal error: Uncaught EngineException: Call to a member function execute() on boolean in %s:%d +Fatal error: Uncaught Error: Call to a member function execute() on boolean in %s:%d Stack trace: #0 {main} thrown in %s on line %d diff --git a/ext/pdo_mysql/tests/pdo_mysql_stmt_errorcode.phpt b/ext/pdo_mysql/tests/pdo_mysql_stmt_errorcode.phpt index 06a6a418f9e94..0e27b0119c4e6 100644 --- a/ext/pdo_mysql/tests/pdo_mysql_stmt_errorcode.phpt +++ b/ext/pdo_mysql/tests/pdo_mysql_stmt_errorcode.phpt @@ -56,7 +56,7 @@ Testing native PS... Warning: PDO::prepare(): SQLSTATE[42S02]: Base table or view not found: 1146 Table '%s.ihopeitdoesnotexist' doesn't exist in %s on line %d -Fatal error: Uncaught EngineException: Call to a member function execute() on boolean in %s:%d +Fatal error: Uncaught Error: Call to a member function execute() on boolean in %s:%d Stack trace: #0 {main} thrown in %s on line %d diff --git a/ext/pdo_mysql/tests/pdo_mysql_stmt_multiquery.phpt b/ext/pdo_mysql/tests/pdo_mysql_stmt_multiquery.phpt index 1caa875a324cb..db92e40a93553 100644 --- a/ext/pdo_mysql/tests/pdo_mysql_stmt_multiquery.phpt +++ b/ext/pdo_mysql/tests/pdo_mysql_stmt_multiquery.phpt @@ -99,7 +99,7 @@ Native Prepared Statements... Warning: PDO::query(): SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your %s server version for the right syntax to use near '%SSELECT label FROM test ORDER BY id ASC LIMIT 1' at line %d in %s on line %d -Fatal error: Uncaught EngineException: Call to a member function errorInfo() on boolean in %s:%d +Fatal error: Uncaught Error: Call to a member function errorInfo() on boolean in %s:%d Stack trace: #0 %s(%d): mysql_stmt_multiquery_wrong_usage(Object(PDO)) #1 {main} diff --git a/ext/phar/tests/cache_list/frontcontroller29.phpt b/ext/phar/tests/cache_list/frontcontroller29.phpt index 39c27fcdd74eb..c86cdfe4acabf 100644 --- a/ext/phar/tests/cache_list/frontcontroller29.phpt +++ b/ext/phar/tests/cache_list/frontcontroller29.phpt @@ -14,7 +14,7 @@ files/frontcontroller8.phar --EXPECTHEADERS-- Content-type: text/html; charset=UTF-8 --EXPECTF-- -Fatal error: Uncaught EngineException: Call to undefined function oopsie_daisy() in phar://%sfatalerror.phps:1 +Fatal error: Uncaught Error: Call to undefined function oopsie_daisy() in phar://%sfatalerror.phps:1 Stack trace: #0 [internal function]: unknown() #1 %s(%d): Phar::webPhar('whatever', 'index.php', '404.php', Array) diff --git a/ext/phar/tests/frontcontroller29.phpt b/ext/phar/tests/frontcontroller29.phpt index 5369a6084562b..710a58f91b1dc 100644 --- a/ext/phar/tests/frontcontroller29.phpt +++ b/ext/phar/tests/frontcontroller29.phpt @@ -13,7 +13,7 @@ files/frontcontroller8.phar --EXPECTHEADERS-- Content-type: text/html; charset=UTF-8 --EXPECTF-- -Fatal error: Uncaught EngineException: Call to undefined function oopsie_daisy() in phar://%sfatalerror.phps:1 +Fatal error: Uncaught Error: Call to undefined function oopsie_daisy() in phar://%sfatalerror.phps:1 Stack trace: #0 [internal function]: unknown() #1 %s(%d): Phar::webPhar('whatever', 'index.php', '404.php', Array) diff --git a/ext/reflection/tests/ReflectionClass_CannotClone_basic.phpt b/ext/reflection/tests/ReflectionClass_CannotClone_basic.phpt index 0d1ef20ad73cd..900ce21d4539f 100644 --- a/ext/reflection/tests/ReflectionClass_CannotClone_basic.phpt +++ b/ext/reflection/tests/ReflectionClass_CannotClone_basic.phpt @@ -12,7 +12,7 @@ if (!extension_loaded('reflection)) print 'skip'; $rc = new ReflectionClass("stdClass"); $rc2 = clone($rc); --EXPECTF-- -Fatal error: Uncaught EngineException: Trying to clone an uncloneable object of class ReflectionClass in %s:%d +Fatal error: Uncaught Error: Trying to clone an uncloneable object of class ReflectionClass in %s:%d Stack trace: #0 {main} thrown in %s on line %d diff --git a/ext/reflection/tests/ReflectionClass_getName_error1.phpt b/ext/reflection/tests/ReflectionClass_getName_error1.phpt index e475688b6d06b..dcdfcdf98f6a8 100644 --- a/ext/reflection/tests/ReflectionClass_getName_error1.phpt +++ b/ext/reflection/tests/ReflectionClass_getName_error1.phpt @@ -5,7 +5,7 @@ ReflectionClass::getName - forbid static invocation ReflectionClass::getName(); ?> --EXPECTF-- -Fatal error: Uncaught EngineException: Non-static method ReflectionClass::getName() cannot be called statically in %s:2 +Fatal error: Uncaught Error: Non-static method ReflectionClass::getName() cannot be called statically in %s:2 Stack trace: #0 {main} thrown in %s on line 2 diff --git a/ext/reflection/tests/ReflectionClass_isCloneable_001.phpt b/ext/reflection/tests/ReflectionClass_isCloneable_001.phpt index e261855088a8b..361708a3154ed 100644 --- a/ext/reflection/tests/ReflectionClass_isCloneable_001.phpt +++ b/ext/reflection/tests/ReflectionClass_isCloneable_001.phpt @@ -68,7 +68,7 @@ Internal class - XMLWriter bool(false) bool(false) -Fatal error: Uncaught EngineException: Trying to clone an uncloneable object of class XMLWriter in %s:%d +Fatal error: Uncaught Error: Trying to clone an uncloneable object of class XMLWriter in %s:%d Stack trace: #0 {main} thrown in %s on line %d diff --git a/ext/reflection/tests/ReflectionClass_isIterateable_001.phpt b/ext/reflection/tests/ReflectionClass_isIterateable_001.phpt index 47dba9b6ec4ab..42dc647a021fe 100644 --- a/ext/reflection/tests/ReflectionClass_isIterateable_001.phpt +++ b/ext/reflection/tests/ReflectionClass_isIterateable_001.phpt @@ -86,7 +86,7 @@ NULL Test static invocation: -Fatal error: Uncaught EngineException: Non-static method ReflectionClass::isIterateable() cannot be called statically in %s:43 +Fatal error: Uncaught Error: Non-static method ReflectionClass::isIterateable() cannot be called statically in %s:43 Stack trace: #0 {main} thrown in %s on line 43 \ No newline at end of file diff --git a/ext/reflection/tests/ReflectionClass_newInstanceArgs_002.phpt b/ext/reflection/tests/ReflectionClass_newInstanceArgs_002.phpt index ada3c6db48b8c..2754b4c8e3185 100644 --- a/ext/reflection/tests/ReflectionClass_newInstanceArgs_002.phpt +++ b/ext/reflection/tests/ReflectionClass_newInstanceArgs_002.phpt @@ -17,7 +17,7 @@ var_dump($a); ?> --EXPECTF-- -Fatal error: Uncaught TypeException: Argument 1 passed to ReflectionClass::newInstanceArgs() must be of the type array, string given in %s:8 +Fatal error: Uncaught TypeError: Argument 1 passed to ReflectionClass::newInstanceArgs() must be of the type array, string given in %s:8 Stack trace: #0 %s(%d): ReflectionClass->newInstanceArgs('x') #1 {main} diff --git a/ext/reflection/tests/ReflectionObject_getName_error1.phpt b/ext/reflection/tests/ReflectionObject_getName_error1.phpt index 32132f52e88b9..0d88c8439888f 100644 --- a/ext/reflection/tests/ReflectionObject_getName_error1.phpt +++ b/ext/reflection/tests/ReflectionObject_getName_error1.phpt @@ -5,7 +5,7 @@ ReflectionObject::getName - forbid static invocation ReflectionObject::getName(); ?> --EXPECTF-- -Fatal error: Uncaught EngineException: Non-static method ReflectionClass::getName() cannot be called statically in %s:2 +Fatal error: Uncaught Error: Non-static method ReflectionClass::getName() cannot be called statically in %s:2 Stack trace: #0 {main} thrown in %s on line 2 diff --git a/ext/reflection/tests/bug64007.phpt b/ext/reflection/tests/bug64007.phpt index 91b7fa6885c17..a25beb6360d72 100644 --- a/ext/reflection/tests/bug64007.phpt +++ b/ext/reflection/tests/bug64007.phpt @@ -16,7 +16,7 @@ var_dump($generator); --EXPECTF-- string(%d) "Class Generator is an internal class marked as final that cannot be instantiated without invoking its constructor" -Fatal error: Uncaught EngineException: The "Generator" class is reserved for internal use and cannot be manually instantiated in %sbug64007.php:%d +Fatal error: Uncaught Error: The "Generator" class is reserved for internal use and cannot be manually instantiated in %sbug64007.php:%d Stack trace: #0 %s(%d): ReflectionClass->newInstance() #1 {main} diff --git a/ext/session/tests/bug60634_error_1.phpt b/ext/session/tests/bug60634_error_1.phpt index 90983c6f859dd..d0733f5a5a72a 100644 --- a/ext/session/tests/bug60634_error_1.phpt +++ b/ext/session/tests/bug60634_error_1.phpt @@ -45,7 +45,7 @@ echo "um, hi\n"; --EXPECTF-- write: goodbye cruel world -Fatal error: Uncaught EngineException: Call to undefined function undefined_function() in %s:%d +Fatal error: Uncaught Error: Call to undefined function undefined_function() in %s:%d Stack trace: #0 [internal function]: write(%s, '') #1 %s(%d): session_write_close() diff --git a/ext/session/tests/bug60634_error_3.phpt b/ext/session/tests/bug60634_error_3.phpt index d756644f762f3..b7840b04f9de2 100644 --- a/ext/session/tests/bug60634_error_3.phpt +++ b/ext/session/tests/bug60634_error_3.phpt @@ -43,7 +43,7 @@ session_start(); --EXPECTF-- write: goodbye cruel world -Fatal error: Uncaught EngineException: Call to undefined function undefined_function() in %s:%d +Fatal error: Uncaught Error: Call to undefined function undefined_function() in %s:%d Stack trace: #0 [internal function]: write(%s, '') #1 {main} diff --git a/ext/session/tests/bug60634_error_5.phpt b/ext/session/tests/bug60634_error_5.phpt index 018cf17538c45..18f1266a00cf4 100644 --- a/ext/session/tests/bug60634_error_5.phpt +++ b/ext/session/tests/bug60634_error_5.phpt @@ -44,7 +44,7 @@ echo "um, hi\n"; --EXPECTF-- close: goodbye cruel world -Fatal error: Uncaught EngineException: Call to undefined function undefined_function() in %s:%d +Fatal error: Uncaught Error: Call to undefined function undefined_function() in %s:%d Stack trace: #0 [internal function]: close() #1 %s(%d): session_write_close() diff --git a/ext/simplexml/tests/SimpleXMLElement_xpath.phpt b/ext/simplexml/tests/SimpleXMLElement_xpath.phpt index 7926ceb6e1f72..8e84c51d6775d 100644 --- a/ext/simplexml/tests/SimpleXMLElement_xpath.phpt +++ b/ext/simplexml/tests/SimpleXMLElement_xpath.phpt @@ -11,7 +11,7 @@ Notice: Undefined variable: x in %s on line %d Warning: simplexml_load_string() expects parameter 3 to be integer, float given in %s on line %d -Fatal error: Uncaught EngineException: Call to a member function xpath() on null in %s:%d +Fatal error: Uncaught Error: Call to a member function xpath() on null in %s:%d Stack trace: #0 {main} thrown in %s on line %d diff --git a/ext/spl/tests/arrayObject_setFlags_basic2.phpt b/ext/spl/tests/arrayObject_setFlags_basic2.phpt index e1d816e158d13..6eece74cbba01 100644 --- a/ext/spl/tests/arrayObject_setFlags_basic2.phpt +++ b/ext/spl/tests/arrayObject_setFlags_basic2.phpt @@ -26,7 +26,7 @@ string(6) "secret" string(6) "public" string(6) "secret" -Fatal error: Uncaught EngineException: Cannot access private property C::$x in %s:19 +Fatal error: Uncaught Error: Cannot access private property C::$x in %s:19 Stack trace: #0 {main} thrown in %s on line 19 diff --git a/ext/spl/tests/bug48023.phpt b/ext/spl/tests/bug48023.phpt index 1af4190d0a6c8..9cb8dd2c1fe06 100644 --- a/ext/spl/tests/bug48023.phpt +++ b/ext/spl/tests/bug48023.phpt @@ -9,7 +9,7 @@ new Foo; ?> ===DONE=== --EXPECTF-- -Fatal error: Uncaught EngineException: Class 'Foo' not found in %s:%d +Fatal error: Uncaught Error: Class 'Foo' not found in %s:%d Stack trace: #0 {main} thrown in %s on line %d diff --git a/ext/spl/tests/bug49972.phpt b/ext/spl/tests/bug49972.phpt index cc0aff3bed8de..836d399ed9ed8 100644 --- a/ext/spl/tests/bug49972.phpt +++ b/ext/spl/tests/bug49972.phpt @@ -8,7 +8,7 @@ $iterator->undefined(); ?> --EXPECTF-- -Fatal error: Uncaught EngineException: Call to undefined method AppendIterator::undefined() in %s:%d +Fatal error: Uncaught Error: Call to undefined method AppendIterator::undefined() in %s:%d Stack trace: #0 {main} thrown in %s on line %d diff --git a/ext/spl/tests/iterator_035.phpt b/ext/spl/tests/iterator_035.phpt index bedb7684d5473..307337431ab51 100644 --- a/ext/spl/tests/iterator_035.phpt +++ b/ext/spl/tests/iterator_035.phpt @@ -14,7 +14,7 @@ echo "Done\n"; --EXPECTF-- Notice: Indirect modification of overloaded element of ArrayIterator has no effect in %s on line %d -Fatal error: Uncaught EngineException: Cannot assign by reference to overloaded object in %s:%d +Fatal error: Uncaught Error: Cannot assign by reference to overloaded object in %s:%d Stack trace: #0 {main} thrown in %s on line %d diff --git a/ext/spl/tests/iterator_count.phpt b/ext/spl/tests/iterator_count.phpt index b70afc18c3816..c0dad0f4223c2 100644 --- a/ext/spl/tests/iterator_count.phpt +++ b/ext/spl/tests/iterator_count.phpt @@ -23,7 +23,7 @@ Warning: iterator_count() expects exactly 1 parameter, 0 given in %s Warning: iterator_count() expects exactly 1 parameter, 2 given in %s -Fatal error: Uncaught TypeException: Argument 1 passed to iterator_count() must implement interface Traversable, string given in %s:%d +Fatal error: Uncaught TypeError: Argument 1 passed to iterator_count() must implement interface Traversable, string given in %s:%d Stack trace: #0 %s(%d): iterator_count('1') #1 {main} diff --git a/ext/spl/tests/iterator_to_array.phpt b/ext/spl/tests/iterator_to_array.phpt index 925ee372d4c8d..f36b99db23f56 100644 --- a/ext/spl/tests/iterator_to_array.phpt +++ b/ext/spl/tests/iterator_to_array.phpt @@ -22,7 +22,7 @@ Warning: iterator_to_array() expects at least 1 parameter, 0 given in %s Warning: iterator_to_array() expects at most 2 parameters, 3 given in %s -Fatal error: Uncaught TypeException: Argument 1 passed to iterator_to_array() must implement interface Traversable, string given in %s:%d +Fatal error: Uncaught TypeError: Argument 1 passed to iterator_to_array() must implement interface Traversable, string given in %s:%d Stack trace: #0 %s(%d): iterator_to_array('test', 'test') #1 {main} diff --git a/ext/spl/tests/spl_iterator_recursive_getiterator_error.phpt b/ext/spl/tests/spl_iterator_recursive_getiterator_error.phpt index 6fbcec9dff8f9..debc85e622774 100644 --- a/ext/spl/tests/spl_iterator_recursive_getiterator_error.phpt +++ b/ext/spl/tests/spl_iterator_recursive_getiterator_error.phpt @@ -13,7 +13,7 @@ function p ($i) { } ?> --EXPECTF-- -Fatal error: Uncaught EngineException: An iterator cannot be used with foreach by reference in %s:%d +Fatal error: Uncaught Error: An iterator cannot be used with foreach by reference in %s:%d Stack trace: #0 %s(%d): p(Object(IteratorIterator)) #1 {main} diff --git a/ext/standard/tests/array/arsort_object1.phpt b/ext/standard/tests/array/arsort_object1.phpt index 75be19b52ebe6..f73696392eaa1 100644 --- a/ext/standard/tests/array/arsort_object1.phpt +++ b/ext/standard/tests/array/arsort_object1.phpt @@ -87,7 +87,7 @@ echo "Done\n"; --EXPECTF-- *** Testing arsort() : object functionality *** -Fatal error: Uncaught EngineException: Class 'for_integer_asort' not found in %sarsort_object1.php:%d +Fatal error: Uncaught Error: Class 'for_integer_asort' not found in %sarsort_object1.php:%d Stack trace: #0 {main} thrown in %sarsort_object1.php on line %d \ No newline at end of file diff --git a/ext/standard/tests/array/arsort_object2.phpt b/ext/standard/tests/array/arsort_object2.phpt index 077e2ced16868..f5ed33362323f 100644 --- a/ext/standard/tests/array/arsort_object2.phpt +++ b/ext/standard/tests/array/arsort_object2.phpt @@ -91,7 +91,7 @@ echo "Done\n"; --EXPECTF-- *** Testing arsort() : object functionality *** -Fatal error: Uncaught EngineException: Class 'for_integer_asort' not found in %sarsort_object2.php:%d +Fatal error: Uncaught Error: Class 'for_integer_asort' not found in %sarsort_object2.php:%d Stack trace: #0 {main} thrown in %sarsort_object2.php on line %d \ No newline at end of file diff --git a/ext/standard/tests/file/bug38450_3.phpt b/ext/standard/tests/file/bug38450_3.phpt index 0193d44d9f048..f2c4643ef3ec4 100644 --- a/ext/standard/tests/file/bug38450_3.phpt +++ b/ext/standard/tests/file/bug38450_3.phpt @@ -104,7 +104,7 @@ echo "Done\n"; --EXPECTF-- Warning: fopen(var://myvar): failed to open stream: "VariableStream::stream_open" call failed in %sbug38450_3.php on line %d -Fatal error: Uncaught TypeException: Argument 1 passed to VariableStream::__construct() must be of the type array, none given in %s:%d +Fatal error: Uncaught TypeError: Argument 1 passed to VariableStream::__construct() must be of the type array, none given in %s:%d Stack trace: #0 [internal function]: VariableStream->__construct() #1 %s(%d): fopen('var://myvar', 'r+') diff --git a/ext/standard/tests/general_functions/bug47857.phpt b/ext/standard/tests/general_functions/bug47857.phpt index a2b0dac5e4529..8bf04a39aa574 100644 --- a/ext/standard/tests/general_functions/bug47857.phpt +++ b/ext/standard/tests/general_functions/bug47857.phpt @@ -19,7 +19,7 @@ Deprecated: Non-static method foo::bar() should not be called statically in %sbu ok bool(false) -Fatal error: Uncaught EngineException: Non-static method BaseException::getMessage() cannot be called statically in %sbug47857.php:%d +Fatal error: Uncaught Error: Non-static method Exception::getMessage() cannot be called statically in %sbug47857.php:%d Stack trace: #0 {main} thrown in %sbug47857.php on line %d diff --git a/ext/standard/tests/serialize/bug69152.phpt b/ext/standard/tests/serialize/bug69152.phpt index 83d7ebfb52775..b766c0afbdee9 100644 --- a/ext/standard/tests/serialize/bug69152.phpt +++ b/ext/standard/tests/serialize/bug69152.phpt @@ -2,7 +2,7 @@ Bug #69152: Type Confusion Infoleak Vulnerability in unserialize() --FILE-- test(); diff --git a/ext/tidy/tests/035.phpt b/ext/tidy/tests/035.phpt index 8292755811049..1fe0d5c9f1c7c 100644 --- a/ext/tidy/tests/035.phpt +++ b/ext/tidy/tests/035.phpt @@ -9,7 +9,7 @@ tidyNode::__construct() new tidyNode; ?> --EXPECTF-- -Fatal error: Uncaught EngineException: Call to private tidyNode::__construct() from invalid context in %s:%d +Fatal error: Uncaught Error: Call to private tidyNode::__construct() from invalid context in %s:%d Stack trace: #0 {main} thrown in %s on line %d diff --git a/ext/xmlreader/tests/bug51936.phpt b/ext/xmlreader/tests/bug51936.phpt index 8748c1ff32e9d..821cef41b81ba 100644 --- a/ext/xmlreader/tests/bug51936.phpt +++ b/ext/xmlreader/tests/bug51936.phpt @@ -19,7 +19,7 @@ Done --EXPECTF-- Test -Fatal error: Uncaught EngineException: Trying to clone an uncloneable object of class XMLReader in %s:%d +Fatal error: Uncaught Error: Trying to clone an uncloneable object of class XMLReader in %s:%d Stack trace: #0 {main} thrown in %s on line %d diff --git a/sapi/cgi/tests/004.phpt b/sapi/cgi/tests/004.phpt index 1d4e71952921e..8769126561ea1 100644 --- a/sapi/cgi/tests/004.phpt +++ b/sapi/cgi/tests/004.phpt @@ -36,7 +36,7 @@ echo "Done\n"; --EXPECTF-- string(%d) "
-Fatal error: Uncaught EngineException: Cannot access private property test::$pri in %s004.test.php:8 +Fatal error: Uncaught Error: Cannot access private property test::$pri in %s004.test.php:8 Stack trace: #0 {main} thrown in %s004.test.php on line 8
diff --git a/sapi/cli/tests/008.phpt b/sapi/cli/tests/008.phpt index 5037e1cfd4f94..0121d94a272c0 100644 --- a/sapi/cli/tests/008.phpt +++ b/sapi/cli/tests/008.phpt @@ -36,7 +36,7 @@ echo "Done\n"; --EXPECTF-- string(%d) " -Fatal error: Uncaught EngineException: Cannot access private property test::$pri in %s:%d +Fatal error: Uncaught Error: Cannot access private property test::$pri in %s:%d Stack trace: #0 {main} thrown in %s on line %d diff --git a/sapi/cli/tests/php_cli_server_015.phpt b/sapi/cli/tests/php_cli_server_015.phpt index 0b13a195d54fb..af0a3f65a8045 100644 --- a/sapi/cli/tests/php_cli_server_015.phpt +++ b/sapi/cli/tests/php_cli_server_015.phpt @@ -46,7 +46,7 @@ X-Powered-By: PHP/%s Content-type: text/html; charset=UTF-8
-Fatal error: Uncaught EngineException: Call to undefined function non_exists_function() in %ssyntax_error.php:%d +Fatal error: Uncaught Error: Call to undefined function non_exists_function() in %ssyntax_error.php:%d Stack trace: #0 %sindex.php(%d): require() #1 {main} diff --git a/tests/classes/abstract.phpt b/tests/classes/abstract.phpt index 811aa45a13baa..5852005f432f4 100644 --- a/tests/classes/abstract.phpt +++ b/tests/classes/abstract.phpt @@ -27,7 +27,7 @@ echo "Done\n"; // shouldn't be displayed --EXPECTF-- Call to function show() -Fatal error: Uncaught EngineException: Cannot call abstract method fail::show() in %s:%d +Fatal error: Uncaught Error: Cannot call abstract method fail::show() in %s:%d Stack trace: #0 %s(%d): pass->error() #1 {main} diff --git a/tests/classes/abstract_class.phpt b/tests/classes/abstract_class.phpt index 1725d457621ee..2085bff009fb2 100644 --- a/tests/classes/abstract_class.phpt +++ b/tests/classes/abstract_class.phpt @@ -26,7 +26,7 @@ echo "Done\n"; // shouldn't be displayed --EXPECTF-- Call to function show() -Fatal error: Uncaught EngineException: Cannot instantiate abstract class fail in %s:%d +Fatal error: Uncaught Error: Cannot instantiate abstract class fail in %s:%d Stack trace: #0 {main} thrown in %s on line %d diff --git a/tests/classes/abstract_inherit.phpt b/tests/classes/abstract_inherit.phpt index 1657599787be6..583043d22b6ea 100644 --- a/tests/classes/abstract_inherit.phpt +++ b/tests/classes/abstract_inherit.phpt @@ -19,7 +19,7 @@ echo "Done\n"; // Shouldn't be displayed ?> --EXPECTF-- -Fatal error: Uncaught EngineException: Cannot instantiate abstract class fail in %s:%d +Fatal error: Uncaught Error: Cannot instantiate abstract class fail in %s:%d Stack trace: #0 {main} thrown in %s on line %d diff --git a/tests/classes/abstract_user_call.phpt b/tests/classes/abstract_user_call.phpt index 5118efda9991f..3e885177150e4 100644 --- a/tests/classes/abstract_user_call.phpt +++ b/tests/classes/abstract_user_call.phpt @@ -27,7 +27,7 @@ call_user_func(array($o, 'test_base::func')); --EXPECTF-- test::func() -Fatal error: Uncaught EngineException: Cannot call abstract method test_base::func() in %s:%d +Fatal error: Uncaught Error: Cannot call abstract method test_base::func() in %s:%d Stack trace: #0 {main} thrown in %s on line %d diff --git a/tests/classes/array_access_012.phpt b/tests/classes/array_access_012.phpt index ef8553493f22b..1fe0b248658b7 100644 --- a/tests/classes/array_access_012.phpt +++ b/tests/classes/array_access_012.phpt @@ -33,7 +33,7 @@ $data['element'] = &$test; Notice: Indirect modification of overloaded element of ArrayAccessImpl has no effect in %sarray_access_012.php on line 24 -Fatal error: Uncaught EngineException: Cannot assign by reference to overloaded object in %sarray_access_012.php:24 +Fatal error: Uncaught Error: Cannot assign by reference to overloaded object in %sarray_access_012.php:24 Stack trace: #0 {main} thrown in %sarray_access_012.php on line 24 diff --git a/tests/classes/autoload_009.phpt b/tests/classes/autoload_009.phpt index 2af2d9adc4aff..51d3e8f7910e9 100644 --- a/tests/classes/autoload_009.phpt +++ b/tests/classes/autoload_009.phpt @@ -14,7 +14,7 @@ Ensure type hints for unknown types do not trigger autoload. f(new stdClass); ?> --EXPECTF-- -Fatal error: Uncaught TypeException: Argument 1 passed to f() must be an instance of UndefClass, instance of stdClass given, called in %s on line %d and defined in %s:%d +Fatal error: Uncaught TypeError: Argument 1 passed to f() must be an instance of UndefClass, instance of stdClass given, called in %s on line %d and defined in %s:%d Stack trace: #0 %s(%d): f() #1 {main} diff --git a/tests/classes/autoload_021.phpt b/tests/classes/autoload_021.phpt index c3945ed4b3800..3237627380975 100644 --- a/tests/classes/autoload_021.phpt +++ b/tests/classes/autoload_021.phpt @@ -10,7 +10,7 @@ $x = new $a; echo "BUG\n"; ?> --EXPECTF-- -Fatal error: Uncaught EngineException: Class '../BUG' not found in %sautoload_021.php:6 +Fatal error: Uncaught Error: Class '../BUG' not found in %sautoload_021.php:6 Stack trace: #0 {main} thrown in %sautoload_021.php on line 6 diff --git a/tests/classes/bug27504.phpt b/tests/classes/bug27504.phpt index 1555f5343cb48..ba44806bfec86 100644 --- a/tests/classes/bug27504.phpt +++ b/tests/classes/bug27504.phpt @@ -22,7 +22,7 @@ Called function foo:bar(1) Warning: call_user_func_array() expects parameter 1 to be a valid callback, cannot access private method foo::bar() in %s on line %d -Fatal error: Uncaught EngineException: Call to private method foo::bar() from context '' in %s:%d +Fatal error: Uncaught Error: Call to private method foo::bar() from context '' in %s:%d Stack trace: #0 {main} thrown in %s on line %d diff --git a/tests/classes/class_abstract.phpt b/tests/classes/class_abstract.phpt index 04b21b5259bd2..10fcdba4618d3 100644 --- a/tests/classes/class_abstract.phpt +++ b/tests/classes/class_abstract.phpt @@ -25,7 +25,7 @@ echo "Done\n"; // shouldn't be displayed --EXPECTF-- base -Fatal error: Uncaught EngineException: Cannot instantiate abstract class base in %s:%d +Fatal error: Uncaught Error: Cannot instantiate abstract class base in %s:%d Stack trace: #0 {main} thrown in %s on line %d diff --git a/tests/classes/constants_basic_001.phpt b/tests/classes/constants_basic_001.phpt index 457584df321b6..9536b2a38fcd2 100644 --- a/tests/classes/constants_basic_001.phpt +++ b/tests/classes/constants_basic_001.phpt @@ -86,7 +86,7 @@ string(6) "hello2" Expecting fatal error: -Fatal error: Uncaught EngineException: Undefined class constant 'c19' in %s:53 +Fatal error: Uncaught Error: Undefined class constant 'c19' in %s:53 Stack trace: #0 {main} thrown in %s on line 53 diff --git a/tests/classes/ctor_visibility.phpt b/tests/classes/ctor_visibility.phpt index 69383675a1547..e7288bb968053 100644 --- a/tests/classes/ctor_visibility.phpt +++ b/tests/classes/ctor_visibility.phpt @@ -66,7 +66,7 @@ Test::__construct() TestPriv::__construct() DerivedPriv::__construct() -Fatal error: Uncaught EngineException: Cannot call private TestPriv::__construct() in %sctor_visibility.php:%d +Fatal error: Uncaught Error: Cannot call private TestPriv::__construct() in %sctor_visibility.php:%d Stack trace: #0 %s(%d): DerivedPriv->__construct() #1 %s(%d): DerivedPriv::f() diff --git a/tests/classes/destructor_visibility_001.phpt b/tests/classes/destructor_visibility_001.phpt index 40a62f2ec434e..b99c0b20caf49 100644 --- a/tests/classes/destructor_visibility_001.phpt +++ b/tests/classes/destructor_visibility_001.phpt @@ -21,7 +21,7 @@ unset($obj); ?> ===DONE=== --EXPECTF-- -Fatal error: Uncaught EngineException: Call to private Derived::__destruct() from context '' in %sdestructor_visibility_001.php:%d +Fatal error: Uncaught Error: Call to private Derived::__destruct() from context '' in %sdestructor_visibility_001.php:%d Stack trace: #0 {main} thrown in %sdestructor_visibility_001.php on line %d diff --git a/tests/classes/factory_and_singleton_003.phpt b/tests/classes/factory_and_singleton_003.phpt index 272773c439880..e312f55442afd 100644 --- a/tests/classes/factory_and_singleton_003.phpt +++ b/tests/classes/factory_and_singleton_003.phpt @@ -15,7 +15,7 @@ $obj = new test; echo "Done\n"; ?> --EXPECTF-- -Fatal error: Uncaught EngineException: Call to protected test::__construct() from invalid context in %s:%d +Fatal error: Uncaught Error: Call to protected test::__construct() from invalid context in %s:%d Stack trace: #0 {main} thrown in %s on line %d diff --git a/tests/classes/factory_and_singleton_004.phpt b/tests/classes/factory_and_singleton_004.phpt index 89c4f161ea141..a8a2f1d7c5942 100644 --- a/tests/classes/factory_and_singleton_004.phpt +++ b/tests/classes/factory_and_singleton_004.phpt @@ -15,7 +15,7 @@ $obj = new test; echo "Done\n"; ?> --EXPECTF-- -Fatal error: Uncaught EngineException: Call to private test::__construct() from invalid context in %s:%d +Fatal error: Uncaught Error: Call to private test::__construct() from invalid context in %s:%d Stack trace: #0 {main} thrown in %s on line %d diff --git a/tests/classes/factory_and_singleton_005.phpt b/tests/classes/factory_and_singleton_005.phpt index e4911f086fa6b..2bb328da7ec8e 100644 --- a/tests/classes/factory_and_singleton_005.phpt +++ b/tests/classes/factory_and_singleton_005.phpt @@ -16,7 +16,7 @@ $obj = NULL; echo "Done\n"; ?> --EXPECTF-- -Fatal error: Uncaught EngineException: Call to protected test::__destruct() from context '' in %sfactory_and_singleton_005.php:%d +Fatal error: Uncaught Error: Call to protected test::__destruct() from context '' in %sfactory_and_singleton_005.php:%d Stack trace: #0 {main} thrown in %sfactory_and_singleton_005.php on line %d diff --git a/tests/classes/factory_and_singleton_006.phpt b/tests/classes/factory_and_singleton_006.phpt index 38b8ceb155c05..5e1c7092d1f4f 100644 --- a/tests/classes/factory_and_singleton_006.phpt +++ b/tests/classes/factory_and_singleton_006.phpt @@ -16,7 +16,7 @@ $obj = NULL; echo "Done\n"; ?> --EXPECTF-- -Fatal error: Uncaught EngineException: Call to private test::__destruct() from context '' in %sfactory_and_singleton_006.php:%d +Fatal error: Uncaught Error: Call to private test::__destruct() from context '' in %sfactory_and_singleton_006.php:%d Stack trace: #0 {main} thrown in %sfactory_and_singleton_006.php on line %d diff --git a/tests/classes/factory_and_singleton_007.phpt b/tests/classes/factory_and_singleton_007.phpt index c86243bcfd9b4..b55168efe5d2b 100644 --- a/tests/classes/factory_and_singleton_007.phpt +++ b/tests/classes/factory_and_singleton_007.phpt @@ -17,7 +17,7 @@ $obj = NULL; echo "Done\n"; ?> --EXPECTF-- -Fatal error: Uncaught EngineException: Call to protected test::__clone() from context '' in %s:%d +Fatal error: Uncaught Error: Call to protected test::__clone() from context '' in %s:%d Stack trace: #0 {main} thrown in %s on line %d diff --git a/tests/classes/factory_and_singleton_008.phpt b/tests/classes/factory_and_singleton_008.phpt index d6041b0105bcb..49d4f0a1ffe60 100644 --- a/tests/classes/factory_and_singleton_008.phpt +++ b/tests/classes/factory_and_singleton_008.phpt @@ -17,7 +17,7 @@ $obj = NULL; echo "Done\n"; ?> --EXPECTF-- -Fatal error: Uncaught EngineException: Call to private test::__clone() from context '' in %s:%d +Fatal error: Uncaught Error: Call to private test::__clone() from context '' in %s:%d Stack trace: #0 {main} thrown in %s on line %d diff --git a/tests/classes/interface_instantiate.phpt b/tests/classes/interface_instantiate.phpt index 310dc8800d894..70e2e3e8b67de 100644 --- a/tests/classes/interface_instantiate.phpt +++ b/tests/classes/interface_instantiate.phpt @@ -13,7 +13,7 @@ $t = new if_a(); ?> --EXPECTF-- -Fatal error: Uncaught EngineException: Cannot instantiate interface if_a in %s:%d +Fatal error: Uncaught Error: Cannot instantiate interface if_a in %s:%d Stack trace: #0 {main} thrown in %s on line %d diff --git a/tests/classes/interfaces_003.phpt b/tests/classes/interfaces_003.phpt index 0ce8f9e3207c4..e1cbfdaf54e8a 100644 --- a/tests/classes/interfaces_003.phpt +++ b/tests/classes/interfaces_003.phpt @@ -23,7 +23,7 @@ $obj = new MyTestClass; ===DONE=== --EXPECTF-- -Fatal error: Uncaught TypeException: Argument 1 passed to MyTestClass::__construct() must be an instance of MyObject, none given, called in %sinterfaces_003.php:%d +Fatal error: Uncaught TypeError: Argument 1 passed to MyTestClass::__construct() must be an instance of MyObject, none given, called in %sinterfaces_003.php:%d Stack trace: #0 %s(%d): MyTestClass->__construct() #1 {main} diff --git a/tests/classes/private_001.phpt b/tests/classes/private_001.phpt index 11574ccde3425..9dba49e743a97 100644 --- a/tests/classes/private_001.phpt +++ b/tests/classes/private_001.phpt @@ -23,7 +23,7 @@ echo "Done\n"; // shouldn't be displayed --EXPECTF-- Call show() -Fatal error: Uncaught EngineException: Call to private method pass::show() from context '' in %s:%d +Fatal error: Uncaught Error: Call to private method pass::show() from context '' in %s:%d Stack trace: #0 {main} thrown in %s on line %d diff --git a/tests/classes/private_002.phpt b/tests/classes/private_002.phpt index 664c95837f918..2e8d26b05862b 100644 --- a/tests/classes/private_002.phpt +++ b/tests/classes/private_002.phpt @@ -32,7 +32,7 @@ echo "Done\n"; // shouldn't be displayed Call pass::show() Call fail::show() -Fatal error: Uncaught EngineException: Call to private method pass::show() from context 'fail' in %s:%d +Fatal error: Uncaught Error: Call to private method pass::show() from context 'fail' in %s:%d Stack trace: #0 %s(%d): fail::show() #1 {main} diff --git a/tests/classes/private_003.phpt b/tests/classes/private_003.phpt index ce18af196e23e..397da5d7e2593 100644 --- a/tests/classes/private_003.phpt +++ b/tests/classes/private_003.phpt @@ -33,7 +33,7 @@ echo "Done\n"; // shouldn't be displayed --EXPECTF-- Call show() -Fatal error: Uncaught EngineException: Call to private method pass::show() from context 'fail' in %s:%d +Fatal error: Uncaught Error: Call to private method pass::show() from context 'fail' in %s:%d Stack trace: #0 %s(%d): fail::not_ok() #1 {main} diff --git a/tests/classes/private_003b.phpt b/tests/classes/private_003b.phpt index 27f398d839ed7..f14de8e9cda91 100644 --- a/tests/classes/private_003b.phpt +++ b/tests/classes/private_003b.phpt @@ -34,7 +34,7 @@ echo "Done\n"; // shouldn't be displayed --EXPECTF-- Call show() -Fatal error: Uncaught EngineException: Call to private method pass::show() from context 'fail' in %s:%d +Fatal error: Uncaught Error: Call to private method pass::show() from context 'fail' in %s:%d Stack trace: #0 %s(%d): fail->not_ok() #1 {main} diff --git a/tests/classes/private_004.phpt b/tests/classes/private_004.phpt index 7ebd72da3b728..749d6eecc99e5 100644 --- a/tests/classes/private_004.phpt +++ b/tests/classes/private_004.phpt @@ -29,7 +29,7 @@ echo "Done\n"; // shouldn't be displayed --EXPECTF-- Call show() -Fatal error: Uncaught EngineException: Call to private method pass::show() from context 'fail' in %s:%d +Fatal error: Uncaught Error: Call to private method pass::show() from context 'fail' in %s:%d Stack trace: #0 %s(%d): fail::do_show() #1 {main} diff --git a/tests/classes/private_004b.phpt b/tests/classes/private_004b.phpt index 5bb9f05b15ba3..8d5cd7c1944fd 100644 --- a/tests/classes/private_004b.phpt +++ b/tests/classes/private_004b.phpt @@ -32,7 +32,7 @@ echo "Done\n"; // shouldn't be displayed --EXPECTF-- Call show() -Fatal error: Uncaught EngineException: Call to private method pass::show() from context 'fail' in %s:%d +Fatal error: Uncaught Error: Call to private method pass::show() from context 'fail' in %s:%d Stack trace: #0 %s(%d): fail->do_show() #1 {main} diff --git a/tests/classes/private_005.phpt b/tests/classes/private_005.phpt index acd9f825b5100..c09c4285e1043 100644 --- a/tests/classes/private_005.phpt +++ b/tests/classes/private_005.phpt @@ -29,7 +29,7 @@ echo "Done\n"; // shouldn't be displayed --EXPECTF-- Call show() -Fatal error: Uncaught EngineException: Call to private method pass::show() from context 'fail' in %s:%d +Fatal error: Uncaught Error: Call to private method pass::show() from context 'fail' in %s:%d Stack trace: #0 %s(%d): fail::do_show() #1 {main} diff --git a/tests/classes/private_005b.phpt b/tests/classes/private_005b.phpt index 5bb9f05b15ba3..8d5cd7c1944fd 100644 --- a/tests/classes/private_005b.phpt +++ b/tests/classes/private_005b.phpt @@ -32,7 +32,7 @@ echo "Done\n"; // shouldn't be displayed --EXPECTF-- Call show() -Fatal error: Uncaught EngineException: Call to private method pass::show() from context 'fail' in %s:%d +Fatal error: Uncaught Error: Call to private method pass::show() from context 'fail' in %s:%d Stack trace: #0 %s(%d): fail->do_show() #1 {main} diff --git a/tests/classes/private_redeclare.phpt b/tests/classes/private_redeclare.phpt index a1b3e459d7ad0..b42cc7d7fe42b 100644 --- a/tests/classes/private_redeclare.phpt +++ b/tests/classes/private_redeclare.phpt @@ -35,7 +35,7 @@ test derived base -Fatal error: Uncaught EngineException: Call to private method base::show() from context 'derived' in %s:%d +Fatal error: Uncaught Error: Call to private method base::show() from context 'derived' in %s:%d Stack trace: #0 %s(%d): derived->test() #1 {main} diff --git a/tests/classes/property_recreate_private.phpt b/tests/classes/property_recreate_private.phpt index c392d077b5c30..7bee1072f9166 100644 --- a/tests/classes/property_recreate_private.phpt +++ b/tests/classes/property_recreate_private.phpt @@ -78,7 +78,7 @@ object(C)#%d (1) { Unset a private property, and attempt to recreate at global scope (expecting failure): -Fatal error: Uncaught EngineException: Cannot access private property C::$p in %s:46 +Fatal error: Uncaught Error: Cannot access private property C::$p in %s:46 Stack trace: #0 {main} thrown in %s on line 46 diff --git a/tests/classes/property_recreate_protected.phpt b/tests/classes/property_recreate_protected.phpt index d5f4b45791c6e..357f27c7963b3 100644 --- a/tests/classes/property_recreate_protected.phpt +++ b/tests/classes/property_recreate_protected.phpt @@ -50,7 +50,7 @@ object(D)#%d (1) { Unset a protected property, and attempt to recreate it outside of scope (expected failure): -Fatal error: Uncaught EngineException: Cannot access protected property %s::$p in %s:32 +Fatal error: Uncaught Error: Cannot access protected property %s::$p in %s:32 Stack trace: #0 {main} thrown in %s on line 32 diff --git a/tests/classes/protected_001.phpt b/tests/classes/protected_001.phpt index fe48ebe67b4ab..aabcd1b2b7f36 100644 --- a/tests/classes/protected_001.phpt +++ b/tests/classes/protected_001.phpt @@ -23,7 +23,7 @@ echo "Done\n"; // shouldn't be displayed --EXPECTF-- Call fail() -Fatal error: Uncaught EngineException: Call to protected method pass::fail() from context '' in %s:%d +Fatal error: Uncaught Error: Call to protected method pass::fail() from context '' in %s:%d Stack trace: #0 {main} thrown in %s on line %d diff --git a/tests/classes/protected_001b.phpt b/tests/classes/protected_001b.phpt index a1c69b9729070..d79c1734bb288 100644 --- a/tests/classes/protected_001b.phpt +++ b/tests/classes/protected_001b.phpt @@ -24,7 +24,7 @@ echo "Done\n"; // shouldn't be displayed --EXPECTF-- Call fail() -Fatal error: Uncaught EngineException: Call to protected method pass::fail() from context '' in %s:%d +Fatal error: Uncaught Error: Call to protected method pass::fail() from context '' in %s:%d Stack trace: #0 {main} thrown in %s on line %d diff --git a/tests/classes/protected_002.phpt b/tests/classes/protected_002.phpt index e67c6b2f3dfc7..89872fa513091 100644 --- a/tests/classes/protected_002.phpt +++ b/tests/classes/protected_002.phpt @@ -32,7 +32,7 @@ echo "Done\n"; // shouldn't be displayed Call pass::show() Call fail::show() -Fatal error: Uncaught EngineException: Call to protected method pass::show() from context 'fail' in %s:%d +Fatal error: Uncaught Error: Call to protected method pass::show() from context 'fail' in %s:%d Stack trace: #0 %s(%d): fail::show() #1 {main} diff --git a/tests/classes/static_properties_003_error1.phpt b/tests/classes/static_properties_003_error1.phpt index 4b8efe2bf4fb0..df297a71b22d4 100644 --- a/tests/classes/static_properties_003_error1.phpt +++ b/tests/classes/static_properties_003_error1.phpt @@ -15,7 +15,7 @@ unset($c->y); --> Access non-visible static prop like instance prop: -Fatal error: Uncaught EngineException: Cannot access protected property C::$y in %s:8 +Fatal error: Uncaught Error: Cannot access protected property C::$y in %s:8 Stack trace: #0 {main} thrown in %s on line 8 diff --git a/tests/classes/static_properties_003_error2.phpt b/tests/classes/static_properties_003_error2.phpt index c43666fbb1679..4509568160877 100644 --- a/tests/classes/static_properties_003_error2.phpt +++ b/tests/classes/static_properties_003_error2.phpt @@ -15,7 +15,7 @@ echo $c->y; --> Access non-visible static prop like instance prop: -Fatal error: Uncaught EngineException: Cannot access protected property C::$y in %s:8 +Fatal error: Uncaught Error: Cannot access protected property C::$y in %s:8 Stack trace: #0 {main} thrown in %s on line 8 diff --git a/tests/classes/static_properties_003_error3.phpt b/tests/classes/static_properties_003_error3.phpt index 8cee25a5e64c7..4f4288a63c5d3 100644 --- a/tests/classes/static_properties_003_error3.phpt +++ b/tests/classes/static_properties_003_error3.phpt @@ -15,7 +15,7 @@ $c->y = 1; --> Access non-visible static prop like instance prop: -Fatal error: Uncaught EngineException: Cannot access protected property C::$y in %s:8 +Fatal error: Uncaught Error: Cannot access protected property C::$y in %s:8 Stack trace: #0 {main} thrown in %s on line 8 diff --git a/tests/classes/static_properties_003_error4.phpt b/tests/classes/static_properties_003_error4.phpt index 3b01351c7a876..b43753f1c50d6 100644 --- a/tests/classes/static_properties_003_error4.phpt +++ b/tests/classes/static_properties_003_error4.phpt @@ -15,11 +15,11 @@ $c->y =& $ref; --> Access non-visible static prop like instance prop: -Fatal error: Uncaught EngineException: Cannot access protected property C::$y in %s:8 +Fatal error: Uncaught Error: Cannot access protected property C::$y in %s:8 Stack trace: #0 {main} -Next EngineException: Cannot access protected property C::$y in %s:8 +Next Error: Cannot access protected property C::$y in %s:8 Stack trace: #0 {main} thrown in %s on line 8 diff --git a/tests/classes/static_properties_undeclared_assign.phpt b/tests/classes/static_properties_undeclared_assign.phpt index 71859abce3253..e2e483516597d 100644 --- a/tests/classes/static_properties_undeclared_assign.phpt +++ b/tests/classes/static_properties_undeclared_assign.phpt @@ -6,7 +6,7 @@ Class C {} C::$p = 1; ?> --EXPECTF-- -Fatal error: Uncaught EngineException: Access to undeclared static property: C::$p in %s:3 +Fatal error: Uncaught Error: Access to undeclared static property: C::$p in %s:3 Stack trace: #0 {main} thrown in %s on line 3 diff --git a/tests/classes/static_properties_undeclared_assignInc.phpt b/tests/classes/static_properties_undeclared_assignInc.phpt index 3f73220de40aa..17577863b19ae 100644 --- a/tests/classes/static_properties_undeclared_assignInc.phpt +++ b/tests/classes/static_properties_undeclared_assignInc.phpt @@ -6,7 +6,7 @@ Class C {} C::$p += 1; ?> --EXPECTF-- -Fatal error: Uncaught EngineException: Access to undeclared static property: C::$p in %s:3 +Fatal error: Uncaught Error: Access to undeclared static property: C::$p in %s:3 Stack trace: #0 {main} thrown in %s on line 3 diff --git a/tests/classes/static_properties_undeclared_assignRef.phpt b/tests/classes/static_properties_undeclared_assignRef.phpt index 8d6b74e9f8590..680aeaf2e849e 100644 --- a/tests/classes/static_properties_undeclared_assignRef.phpt +++ b/tests/classes/static_properties_undeclared_assignRef.phpt @@ -7,7 +7,7 @@ $a = 'foo'; C::$p =& $a; ?> --EXPECTF-- -Fatal error: Uncaught EngineException: Access to undeclared static property: C::$p in %s:4 +Fatal error: Uncaught Error: Access to undeclared static property: C::$p in %s:4 Stack trace: #0 {main} thrown in %s on line 4 diff --git a/tests/classes/static_properties_undeclared_inc.phpt b/tests/classes/static_properties_undeclared_inc.phpt index 56f8606f36d9b..86b0949627694 100644 --- a/tests/classes/static_properties_undeclared_inc.phpt +++ b/tests/classes/static_properties_undeclared_inc.phpt @@ -6,7 +6,7 @@ Class C {} C::$p++; ?> --EXPECTF-- -Fatal error: Uncaught EngineException: Access to undeclared static property: C::$p in %s:3 +Fatal error: Uncaught Error: Access to undeclared static property: C::$p in %s:3 Stack trace: #0 {main} thrown in %s on line 3 diff --git a/tests/classes/static_properties_undeclared_read.phpt b/tests/classes/static_properties_undeclared_read.phpt index 658bc049ab506..7028386c69e25 100644 --- a/tests/classes/static_properties_undeclared_read.phpt +++ b/tests/classes/static_properties_undeclared_read.phpt @@ -6,7 +6,7 @@ Class C {} echo C::$p; ?> --EXPECTF-- -Fatal error: Uncaught EngineException: Access to undeclared static property: C::$p in %s:3 +Fatal error: Uncaught Error: Access to undeclared static property: C::$p in %s:3 Stack trace: #0 {main} thrown in %s on line 3 diff --git a/tests/classes/type_hinting_001.phpt b/tests/classes/type_hinting_001.phpt index 393f15716701f..d9412293e9c48 100644 --- a/tests/classes/type_hinting_001.phpt +++ b/tests/classes/type_hinting_001.phpt @@ -35,7 +35,7 @@ $a->b($b); ?> --EXPECTF-- -Fatal error: Uncaught TypeException: Argument 1 passed to FooBar::a() must implement interface Foo, instance of Blort given, called in %s on line 27 and defined in %s:12 +Fatal error: Uncaught TypeError: Argument 1 passed to FooBar::a() must implement interface Foo, instance of Blort given, called in %s on line 27 and defined in %s:12 Stack trace: #0 %s(%d): FooBar->a() #1 {main} diff --git a/tests/classes/type_hinting_002.phpt b/tests/classes/type_hinting_002.phpt index 1ebceb4549e1e..7486824d50ca5 100644 --- a/tests/classes/type_hinting_002.phpt +++ b/tests/classes/type_hinting_002.phpt @@ -13,7 +13,7 @@ $o = new Foo; $o->a($o); ?> --EXPECTF-- -Fatal error: Uncaught TypeException: Argument 1 passed to Foo::a() must be an instance of NonExisting, instance of Foo given, called in %s on line %d and defined in %s:%d +Fatal error: Uncaught TypeError: Argument 1 passed to Foo::a() must be an instance of NonExisting, instance of Foo given, called in %s on line %d and defined in %s:%d Stack trace: #0 %s(%d): Foo->a() #1 {main} diff --git a/tests/classes/type_hinting_003.phpt b/tests/classes/type_hinting_003.phpt index d8734b1136636..6038f25a50543 100644 --- a/tests/classes/type_hinting_003.phpt +++ b/tests/classes/type_hinting_003.phpt @@ -57,7 +57,7 @@ array(1) { int(25) } -Fatal error: Uncaught TypeException: Argument 1 passed to Test::f1() must be of the type array, integer given, called in %s on line %d and defined in %s:%d +Fatal error: Uncaught TypeError: Argument 1 passed to Test::f1() must be of the type array, integer given, called in %s on line %d and defined in %s:%d Stack trace: #0 %s(%d): Test::f1() #1 {main} diff --git a/tests/lang/041.phpt b/tests/lang/041.phpt index 5e88569a32c96..1540243cbe445 100644 --- a/tests/lang/041.phpt +++ b/tests/lang/041.phpt @@ -17,7 +17,7 @@ echo $wrongClassname::$b."\n"; --EXPECTF-- foo -Fatal error: Uncaught EngineException: Class 'B' not found in %s041.php:%d +Fatal error: Uncaught Error: Class 'B' not found in %s041.php:%d Stack trace: #0 {main} thrown in %s041.php on line %d diff --git a/tests/lang/042.phpt b/tests/lang/042.phpt index bdf7c018fd97f..e9e95c8cc1fa8 100644 --- a/tests/lang/042.phpt +++ b/tests/lang/042.phpt @@ -16,7 +16,7 @@ echo $wrongClassname::B."\n"; --EXPECTF-- foo -Fatal error: Uncaught EngineException: Class 'B' not found in %s042.php:%d +Fatal error: Uncaught Error: Class 'B' not found in %s042.php:%d Stack trace: #0 {main} thrown in %s042.php on line %d diff --git a/tests/lang/043.phpt b/tests/lang/043.phpt index 58457bbce301f..80c427c8a9f8a 100644 --- a/tests/lang/043.phpt +++ b/tests/lang/043.phpt @@ -16,7 +16,7 @@ echo $wrongClassname::foo()."\n"; --EXPECTF-- foo -Fatal error: Uncaught EngineException: Class 'B' not found in %s043.php:%d +Fatal error: Uncaught Error: Class 'B' not found in %s043.php:%d Stack trace: #0 {main} thrown in %s043.php on line %d diff --git a/tests/lang/044.phpt b/tests/lang/044.phpt index 2e0479baee319..eef85c206f417 100644 --- a/tests/lang/044.phpt +++ b/tests/lang/044.phpt @@ -18,7 +18,7 @@ echo $wrongClassname::$methodname()."\n"; --EXPECTF-- foo -Fatal error: Uncaught EngineException: Class 'B' not found in %s044.php:%d +Fatal error: Uncaught Error: Class 'B' not found in %s044.php:%d Stack trace: #0 {main} thrown in %s044.php on line %d diff --git a/tests/lang/bug24658.phpt b/tests/lang/bug24658.phpt index 236d8ed394f0a..6229d52a64849 100644 --- a/tests/lang/bug24658.phpt +++ b/tests/lang/bug24658.phpt @@ -53,7 +53,7 @@ int(2) object(foo)#%d (0) { } -Fatal error: Uncaught TypeException: Argument 1 passed to typehint() must be an instance of foo, integer given in %s:%d +Fatal error: Uncaught TypeError: Argument 1 passed to typehint() must be an instance of foo, integer given in %s:%d Stack trace: #0 [internal function]: typehint(1) #1 %s(%d): array_walk(Array, 'typehint') diff --git a/tests/lang/catchable_error_001.phpt b/tests/lang/catchable_error_001.phpt index f58b26e847160..e63e0d7ccc446 100644 --- a/tests/lang/catchable_error_001.phpt +++ b/tests/lang/catchable_error_001.phpt @@ -19,7 +19,7 @@ Catchable fatal error [1] echo "ALIVE!\n"; ?> --EXPECTF-- -Fatal error: Uncaught TypeException: Argument 1 passed to blah() must be an instance of Foo, instance of stdClass given, called in %scatchable_error_001.php on line 15 and defined in %scatchable_error_001.php:5 +Fatal error: Uncaught TypeError: Argument 1 passed to blah() must be an instance of Foo, instance of stdClass given, called in %scatchable_error_001.php on line 15 and defined in %scatchable_error_001.php:5 Stack trace: #0 %s(%d): blah() #1 {main} diff --git a/tests/lang/foreachLoopIterator.002.phpt b/tests/lang/foreachLoopIterator.002.phpt index 38b8fd66d7aa3..a016dba2b6b80 100644 --- a/tests/lang/foreachLoopIterator.002.phpt +++ b/tests/lang/foreachLoopIterator.002.phpt @@ -21,7 +21,7 @@ foreach ($f as $k=>&$v) { --EXPECTF-- -----( Try to iterate with &$value: )----- -Fatal error: Uncaught EngineException: An iterator cannot be used with foreach by reference in %s:13 +Fatal error: Uncaught Error: An iterator cannot be used with foreach by reference in %s:13 Stack trace: #0 {main} thrown in %s on line 13 diff --git a/tests/lang/type_hints_001.phpt b/tests/lang/type_hints_001.phpt index 71ef9f30c3f1c..d487a86a791da 100644 --- a/tests/lang/type_hints_001.phpt +++ b/tests/lang/type_hints_001.phpt @@ -23,7 +23,7 @@ type_hint_foo($bar); ?> --EXPECTF-- -Fatal error: Uncaught TypeException: Argument 1 passed to type_hint_foo() must be an instance of Foo, instance of Bar given, called in %s on line 16 and defined in %s:9 +Fatal error: Uncaught TypeError: Argument 1 passed to type_hint_foo() must be an instance of Foo, instance of Bar given, called in %s on line 16 and defined in %s:9 Stack trace: #0 %s(%d): type_hint_foo() #1 {main} From 5c54bf015dc4fd930394709d80665d9a731f6f99 Mon Sep 17 00:00:00 2001 From: Aaron Piotrowski Date: Mon, 18 May 2015 14:29:51 -0500 Subject: [PATCH 08/18] Throwable method signatures. --- Zend/zend_interfaces.c | 14 ++++++++++++-- sapi/cli/tests/005.phpt | 18 +++++++++--------- 2 files changed, 21 insertions(+), 11 deletions(-) diff --git a/Zend/zend_interfaces.c b/Zend/zend_interfaces.c index 2b8f8a25bc8ec..3d8398d705ebd 100644 --- a/Zend/zend_interfaces.c +++ b/Zend/zend_interfaces.c @@ -509,7 +509,7 @@ static int zend_implement_throwable(zend_class_entry *interface, zend_class_entr if (instanceof_function(class_type, zend_exception_get_default()) || instanceof_function(class_type, zend_get_error())) { return SUCCESS; } - zend_error_noreturn(E_CORE_ERROR, "Class %s cannot implement interface %s, extend Exception instead", + zend_error_noreturn(E_CORE_ERROR, "Class %s cannot implement interface %s, extend Exception or Error instead", class_type->name->val, interface->name->val); return FAILURE; @@ -565,7 +565,17 @@ const zend_function_entry zend_funcs_serializable[] = { }; /* }}} */ -const zend_function_entry *zend_funcs_throwable = NULL; +const zend_function_entry zend_funcs_throwable[] = { + ZEND_ABSTRACT_ME(throwable, getMessage, NULL) + ZEND_ABSTRACT_ME(throwable, getCode, NULL) + ZEND_ABSTRACT_ME(throwable, getFile, NULL) + ZEND_ABSTRACT_ME(throwable, getLine, NULL) + ZEND_ABSTRACT_ME(throwable, getTrace, NULL) + ZEND_ABSTRACT_ME(throwable, getPrevious, NULL) + ZEND_ABSTRACT_ME(throwable, getTraceAsString, NULL) + ZEND_ABSTRACT_ME(throwable, __toString, NULL) + ZEND_FE_END +}; #define REGISTER_ITERATOR_INTERFACE(class_name, class_name_str) \ {\ diff --git a/sapi/cli/tests/005.phpt b/sapi/cli/tests/005.phpt index 051605f70aff8..60af3fc992722 100644 --- a/sapi/cli/tests/005.phpt +++ b/sapi/cli/tests/005.phpt @@ -40,7 +40,7 @@ string(183) "Class [ class stdClass ] { } " -string(1376) "Class [ class Exception implements Throwable ] { +string(1544) "Class [ class Exception implements Throwable ] { - Constants [0] { } @@ -74,28 +74,28 @@ string(1376) "Class [ class Exception implements Throwable ] { } } - Method [ final public method getMessage ] { + Method [ final public method getMessage ] { } - Method [ final public method getCode ] { + Method [ final public method getCode ] { } - Method [ final public method getFile ] { + Method [ final public method getFile ] { } - Method [ final public method getLine ] { + Method [ final public method getLine ] { } - Method [ final public method getTrace ] { + Method [ final public method getTrace ] { } - Method [ final public method getPrevious ] { + Method [ final public method getPrevious ] { } - Method [ final public method getTraceAsString ] { + Method [ final public method getTraceAsString ] { } - Method [ public method __toString ] { + Method [ public method __toString ] { } } } From 4d590ac35a3a68b8b453cd9bbf3f1300c2507d87 Mon Sep 17 00:00:00 2001 From: Aaron Piotrowski Date: Sun, 14 Jun 2015 22:43:11 -0500 Subject: [PATCH 09/18] Update exception error messages --- Zend/zend_exceptions.c | 16 ++++++++-------- Zend/zend_interfaces.c | 6 ++++-- 2 files changed, 12 insertions(+), 10 deletions(-) diff --git a/Zend/zend_exceptions.c b/Zend/zend_exceptions.c index ae55c1fceaebf..2a3152a00b53e 100644 --- a/Zend/zend_exceptions.c +++ b/Zend/zend_exceptions.c @@ -53,7 +53,7 @@ void zend_exception_set_previous(zend_object *exception, zend_object *add_previo } ZVAL_OBJ(&tmp, add_previous); if (!instanceof_function(Z_OBJCE(tmp), zend_ce_throwable)) { - zend_error_noreturn(E_CORE_ERROR, "Cannot set non exception as previous exception"); + zend_error_noreturn(E_CORE_ERROR, "Previous exception must implement Throwable"); return; } ZVAL_OBJ(&zv, exception); @@ -215,7 +215,7 @@ ZEND_METHOD(exception, __clone) } /* }}} */ -/* {{{ proto Exception::__construct(string message, int code [, Exception previous]) +/* {{{ proto Exception::__construct(string message, int code [, Throwable previous]) Exception constructor */ ZEND_METHOD(exception, __construct) { @@ -229,7 +229,7 @@ ZEND_METHOD(exception, __construct) base_ce = zend_get_exception_base(object); if (zend_parse_parameters_ex(ZEND_PARSE_PARAMS_QUIET, argc, "|SlO!", &message, &code, &previous, base_ce) == FAILURE) { - zend_error(E_EXCEPTION | E_ERROR, "Wrong parameters for Exception([string $exception [, long $code [, Exception $previous = NULL]]])"); + zend_error(E_EXCEPTION | E_ERROR, "Wrong parameters for %s([string $message [, long $code [, Throwable $previous = NULL]]])", base_ce->name->val); return; } @@ -247,7 +247,7 @@ ZEND_METHOD(exception, __construct) } /* }}} */ -/* {{{ proto ErrorException::__construct(string message, int code, int severity [, string filename [, int lineno [, Exception previous]]]) +/* {{{ proto ErrorException::__construct(string message, int code, int severity [, string filename [, int lineno [, Throwable previous]]]) ErrorException constructor */ ZEND_METHOD(error_exception, __construct) { @@ -258,7 +258,7 @@ ZEND_METHOD(error_exception, __construct) size_t message_len, filename_len; if (zend_parse_parameters_ex(ZEND_PARSE_PARAMS_QUIET, argc, "|sllslO!", &message, &message_len, &code, &severity, &filename, &filename_len, &lineno, &previous, default_exception_ce) == FAILURE) { - zend_error(E_EXCEPTION | E_ERROR, "Wrong parameters for ErrorException([string $exception [, long $code, [ long $severity, [ string $filename, [ long $lineno [, Exception $previous = NULL]]]]]])"); + zend_error(E_EXCEPTION | E_ERROR, "Wrong parameters for ErrorException([string $message [, long $code, [ long $severity, [ string $filename, [ long $lineno [, Throwable $previous = NULL]]]]]])"); return; } @@ -761,14 +761,14 @@ void zend_register_default_exception(void) /* {{{ */ zend_class_entry ce; zend_property_info *prop; + memcpy(&default_exception_handlers, zend_get_std_object_handlers(), sizeof(zend_object_handlers)); + default_exception_handlers.clone_obj = NULL; + INIT_CLASS_ENTRY(ce, "Exception", default_exception_functions); default_exception_ce = zend_register_internal_class_ex(&ce, NULL); default_exception_ce->create_object = zend_default_exception_new; zend_class_implements(default_exception_ce, 1, zend_ce_throwable); - memcpy(&default_exception_handlers, zend_get_std_object_handlers(), sizeof(zend_object_handlers)); - default_exception_handlers.clone_obj = NULL; - zend_declare_property_string(default_exception_ce, "message", sizeof("message")-1, "", ZEND_ACC_PROTECTED); zend_declare_property_string(default_exception_ce, "string", sizeof("string")-1, "", ZEND_ACC_PRIVATE); zend_declare_property_long(default_exception_ce, "code", sizeof("code")-1, 0, ZEND_ACC_PROTECTED); diff --git a/Zend/zend_interfaces.c b/Zend/zend_interfaces.c index 3d8398d705ebd..e5b2d3f80e9bb 100644 --- a/Zend/zend_interfaces.c +++ b/Zend/zend_interfaces.c @@ -509,9 +509,11 @@ static int zend_implement_throwable(zend_class_entry *interface, zend_class_entr if (instanceof_function(class_type, zend_exception_get_default()) || instanceof_function(class_type, zend_get_error())) { return SUCCESS; } - zend_error_noreturn(E_CORE_ERROR, "Class %s cannot implement interface %s, extend Exception or Error instead", + zend_error_noreturn(E_ERROR, "Class %s cannot implement interface %s, extend %s or %s instead", class_type->name->val, - interface->name->val); + interface->name->val, + zend_exception_get_default()->name->val, + zend_get_error()->name->val); return FAILURE; } /* }}} */ From 482985ca38a46cef833e9f8be81f909790c8441e Mon Sep 17 00:00:00 2001 From: Aaron Piotrowski Date: Sun, 14 Jun 2015 23:52:39 -0500 Subject: [PATCH 10/18] Changed AssertionException to AssertionError --- Zend/tests/assert/expect_002.phpt | 2 +- Zend/tests/assert/expect_003.phpt | 2 +- Zend/tests/assert/expect_004.phpt | 2 +- Zend/tests/assert/expect_005.phpt | 2 +- Zend/tests/assert/expect_007.phpt | 6 +++--- Zend/tests/assert/expect_008.phpt | 2 +- Zend/tests/assert/expect_009.phpt | 2 +- Zend/tests/assert/expect_010.phpt | 2 +- Zend/tests/assert/expect_011.phpt | 4 ++-- Zend/tests/exception_011.phpt | 2 +- Zend/tests/exception_012.phpt | 2 +- .../ReflectionExtension_getClassNames_basic.phpt | 2 +- ext/standard/assert.c | 12 ++++++------ 13 files changed, 21 insertions(+), 21 deletions(-) diff --git a/Zend/tests/assert/expect_002.phpt b/Zend/tests/assert/expect_002.phpt index f3062b79976a9..3da88e6ece557 100644 --- a/Zend/tests/assert/expect_002.phpt +++ b/Zend/tests/assert/expect_002.phpt @@ -9,7 +9,7 @@ assert(false); var_dump(true); ?> --EXPECTF-- -Fatal error: Uncaught AssertionException: assert(false) in %sexpect_002.php:%d +Fatal error: Uncaught AssertionError: assert(false) in %sexpect_002.php:%d Stack trace: #0 %sexpect_002.php(%d): assert(false, 'assert(false)') #1 {main} diff --git a/Zend/tests/assert/expect_003.phpt b/Zend/tests/assert/expect_003.phpt index 9a35f36cdf84f..350fca6e57b03 100644 --- a/Zend/tests/assert/expect_003.phpt +++ b/Zend/tests/assert/expect_003.phpt @@ -7,7 +7,7 @@ assert.exception=1 getMessage()); } ?> diff --git a/Zend/tests/assert/expect_004.phpt b/Zend/tests/assert/expect_004.phpt index 8b1e648ac785b..111e37295fe94 100644 --- a/Zend/tests/assert/expect_004.phpt +++ b/Zend/tests/assert/expect_004.phpt @@ -7,7 +7,7 @@ assert.exception=1 getMessage()); } ?> diff --git a/Zend/tests/assert/expect_005.phpt b/Zend/tests/assert/expect_005.phpt index 0a296d66b1dc0..f2c91f25666e6 100644 --- a/Zend/tests/assert/expect_005.phpt +++ b/Zend/tests/assert/expect_005.phpt @@ -8,7 +8,7 @@ assert.exception=1 try { /* by passing we test there are no leaks upon success */ assert(true, "I require this to succeed"); -} catch (AssertionException $ex) { +} catch (AssertionError $ex) { var_dump($ex->getMessage()); } var_dump(true); diff --git a/Zend/tests/assert/expect_007.phpt b/Zend/tests/assert/expect_007.phpt index feed56e84f9c6..d74425833d81a 100644 --- a/Zend/tests/assert/expect_007.phpt +++ b/Zend/tests/assert/expect_007.phpt @@ -11,12 +11,12 @@ $data = array( "value" => "testing" ); -class HeaderMalfunctionException extends AssertionException {} +class HeaderMalfunctionError extends AssertionError {} -assert (preg_match("~^([a-zA-Z0-9-]+)$~", $data["key"]), new HeaderMalfunctionException("malformed key found at {$next} \"{$data["key"]}\"")); +assert (preg_match("~^([a-zA-Z0-9-]+)$~", $data["key"]), new HeaderMalfunctionError("malformed key found at {$next} \"{$data["key"]}\"")); ?> --EXPECTF-- -Fatal error: Uncaught HeaderMalfunctionException: malformed key found at 1 "X-HTTP " in %sexpect_007.php:10 +Fatal error: Uncaught HeaderMalfunctionError: malformed key found at 1 "X-HTTP " in %sexpect_007.php:10 Stack trace: #0 {main} thrown in %sexpect_007.php on line 10 diff --git a/Zend/tests/assert/expect_008.phpt b/Zend/tests/assert/expect_008.phpt index 64e524c352342..10c56e5736fd3 100644 --- a/Zend/tests/assert/expect_008.phpt +++ b/Zend/tests/assert/expect_008.phpt @@ -12,7 +12,7 @@ class One { } class Two extends One {} -class OdEar extends AssertionException {} +class OdEar extends AssertionError {} function blah(){ return 1; } diff --git a/Zend/tests/assert/expect_009.phpt b/Zend/tests/assert/expect_009.phpt index a41cba44f4e0a..984a9bf29e8b0 100644 --- a/Zend/tests/assert/expect_009.phpt +++ b/Zend/tests/assert/expect_009.phpt @@ -17,7 +17,7 @@ class Two extends One { new Two(); ?> --EXPECTF-- -Fatal error: Uncaught AssertionException: assert(false) in %sexpect_009.php:%d +Fatal error: Uncaught AssertionError: assert(false) in %sexpect_009.php:%d Stack trace: #0 %sexpect_009.php(%d): assert(false, 'assert(false)') #1 %sexpect_009.php(%d): Two->__construct() diff --git a/Zend/tests/assert/expect_010.phpt b/Zend/tests/assert/expect_010.phpt index 8301d40f72ebd..c3665212fc1dc 100644 --- a/Zend/tests/assert/expect_010.phpt +++ b/Zend/tests/assert/expect_010.phpt @@ -15,7 +15,7 @@ class Two extends One {} new Two(); ?> --EXPECTF-- -Fatal error: Uncaught AssertionException: assert(false) in %sexpect_010.php:%d +Fatal error: Uncaught AssertionError: assert(false) in %sexpect_010.php:%d Stack trace: #0 %sexpect_010.php(%d): assert(false, 'assert(false)') #1 %sexpect_010.php(%d): One->__construct() diff --git a/Zend/tests/assert/expect_011.phpt b/Zend/tests/assert/expect_011.phpt index a48aa9f95fd37..e68852e69f8cc 100644 --- a/Zend/tests/assert/expect_011.phpt +++ b/Zend/tests/assert/expect_011.phpt @@ -5,7 +5,7 @@ zend.assertions=1 assert.exception=1 --FILE-- --EXPECTF-- -Fatal error: Uncaught AssertionException: [Message]: MyExpectations in %sexpect_011.php:%d +Fatal error: Uncaught AssertionError: [Message]: MyExpectations in %sexpect_011.php:%d Stack trace: #0 %sexpect_011.php(%d): assert(false, '[Message]: MyEx...') #1 %sexpect_011.php(%d): One->__construct() diff --git a/Zend/tests/exception_011.phpt b/Zend/tests/exception_011.phpt index d128f06ab8cb2..850a3ecd9f828 100644 --- a/Zend/tests/exception_011.phpt +++ b/Zend/tests/exception_011.phpt @@ -13,7 +13,7 @@ assert(false); --EXPECTHEADERS-- Content-type: text/html; charset=UTF-8 --EXPECTF-- -Fatal error: Uncaught AssertionException: assert(false) in %sexception_011.php:%d +Fatal error: Uncaught AssertionError: assert(false) in %sexception_011.php:%d Stack trace: #0 %sexception_011.php(%d): assert(false, 'assert(false)') #1 {main} diff --git a/Zend/tests/exception_012.phpt b/Zend/tests/exception_012.phpt index eaeaef860482c..bf00529a6ca47 100644 --- a/Zend/tests/exception_012.phpt +++ b/Zend/tests/exception_012.phpt @@ -13,7 +13,7 @@ $func(); --EXPECTHEADERS-- Content-type: text/html; charset=UTF-8 --EXPECTF-- -Fatal error: Uncaught AssertionException: assert(false) in %sexception_012.php(%d) : runtime-created function:%d +Fatal error: Uncaught AssertionError: assert(false) in %sexception_012.php(%d) : runtime-created function:%d Stack trace: #0 %sexception_012.php(%d) : runtime-created function(%d): assert(false, 'assert(false)') #1 %sexception_012.php(%d): __lambda_func() diff --git a/ext/reflection/tests/ReflectionExtension_getClassNames_basic.phpt b/ext/reflection/tests/ReflectionExtension_getClassNames_basic.phpt index 0728d505c317d..3fea08c43f115 100644 --- a/ext/reflection/tests/ReflectionExtension_getClassNames_basic.phpt +++ b/ext/reflection/tests/ReflectionExtension_getClassNames_basic.phpt @@ -17,6 +17,6 @@ array(4) { [2]=> %s(9) "Directory" [3]=> - %s(18) "AssertionException" + %s(14) "AssertionError" } ==DONE== diff --git a/ext/standard/assert.c b/ext/standard/assert.c index 236c2c18e9386..7054278d70ad3 100644 --- a/ext/standard/assert.c +++ b/ext/standard/assert.c @@ -37,7 +37,7 @@ ZEND_END_MODULE_GLOBALS(assert) ZEND_DECLARE_MODULE_GLOBALS(assert) -static zend_class_entry *assertion_exception_ce; +static zend_class_entry *assertion_error_ce; #ifdef ZTS #define ASSERTG(v) ZEND_TSRMG(assert_globals_id, zend_assert_globals *, v) @@ -113,8 +113,8 @@ PHP_MINIT_FUNCTION(assert) /* {{{ */ REGISTER_LONG_CONSTANT("ASSERT_QUIET_EVAL", ASSERT_QUIET_EVAL, CONST_CS|CONST_PERSISTENT); REGISTER_LONG_CONSTANT("ASSERT_EXCEPTION", ASSERT_EXCEPTION, CONST_CS|CONST_PERSISTENT); - INIT_CLASS_ENTRY(ce, "AssertionException", NULL); - assertion_exception_ce = zend_register_internal_class_ex(&ce, zend_exception_get_default()); + INIT_CLASS_ENTRY(ce, "AssertionError", NULL); + assertion_error_ce = zend_register_internal_class_ex(&ce, zend_get_error()); return SUCCESS; } @@ -244,14 +244,14 @@ PHP_FUNCTION(assert) if (ASSERTG(exception)) { if (!description) { - zend_throw_exception(assertion_exception_ce, NULL, E_ERROR); + zend_throw_exception(assertion_error_ce, NULL, E_ERROR); } else if (Z_TYPE_P(description) == IS_OBJECT && - instanceof_function(Z_OBJCE_P(description), assertion_exception_ce)) { + instanceof_function(Z_OBJCE_P(description), assertion_error_ce)) { Z_ADDREF_P(description); zend_throw_exception_object(description); } else { zend_string *str = zval_get_string(description); - zend_throw_exception(assertion_exception_ce, str->val, E_ERROR); + zend_throw_exception(assertion_error_ce, str->val, E_ERROR); zend_string_release(str); } } else if (ASSERTG(warning)) { From 5ed1b8443d03ef47f6cf265dddfd69ab4408fbfc Mon Sep 17 00:00:00 2001 From: Aaron Piotrowski Date: Mon, 15 Jun 2015 00:00:19 -0500 Subject: [PATCH 11/18] Updated UPGRADING with RFC link --- UPGRADING | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/UPGRADING b/UPGRADING index 109b461d213da..b0eecfbd7b24d 100644 --- a/UPGRADING +++ b/UPGRADING @@ -324,7 +324,7 @@ Changes to error handling ------------------------- * There are now two exception classes: Exception and Error. Both classes - implement a new interface Throwable. Typehints in exception handling code + implement a new interface Throwable. Type hints in exception handling code may need to be changed to account for this. * Some fatal errors and recoverable fatal errors now throw an Error instead. @@ -333,7 +333,7 @@ Changes to error handling For the recoverable fatal errors which have been converted into an exception, it is no longer possible to silently ignore the error from an error handler. - In particular, it is no longer possible to ignore typehint failures. + In particular, it is no longer possible to ignore type hint failures. * Parser errors now generate a ParseError that extends Error. Error handling for eval()s on potentially invalid code should be changed to catch @@ -347,6 +347,7 @@ Changes to error handling Relevant RFCs: * https://wiki.php.net/rfc/engine_exceptions_for_php7 +* https://wiki.php.net/rfc/throwable-interface * https://wiki.php.net/rfc/internal_constructor_behaviour * https://wiki.php.net/rfc/reclassify_e_strict From 8e7e4fb6086b762f753abda92c8c0da652b93420 Mon Sep 17 00:00:00 2001 From: Aaron Piotrowski Date: Mon, 15 Jun 2015 01:36:49 -0500 Subject: [PATCH 12/18] Fix previous exception type check --- Zend/zend_exceptions.c | 32 ++++++++++++++++---------------- 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/Zend/zend_exceptions.c b/Zend/zend_exceptions.c index 2a3152a00b53e..1443afc3a2b8b 100644 --- a/Zend/zend_exceptions.c +++ b/Zend/zend_exceptions.c @@ -206,7 +206,7 @@ static zend_object *zend_error_exception_new(zend_class_entry *class_type) /* {{ } /* }}} */ -/* {{{ proto Exception Exception::__clone() +/* {{{ proto Exception|Error Exception|Error::__clone() Clone the exception object */ ZEND_METHOD(exception, __clone) { @@ -215,7 +215,7 @@ ZEND_METHOD(exception, __clone) } /* }}} */ -/* {{{ proto Exception::__construct(string message, int code [, Throwable previous]) +/* {{{ proto Exception|Error::__construct(string message, int code [, Throwable previous]) Exception constructor */ ZEND_METHOD(exception, __construct) { @@ -225,14 +225,14 @@ ZEND_METHOD(exception, __construct) zend_class_entry *base_ce; int argc = ZEND_NUM_ARGS(); - object = getThis(); - base_ce = zend_get_exception_base(object); - - if (zend_parse_parameters_ex(ZEND_PARSE_PARAMS_QUIET, argc, "|SlO!", &message, &code, &previous, base_ce) == FAILURE) { + if (zend_parse_parameters_ex(ZEND_PARSE_PARAMS_QUIET, argc, "|SlO!", &message, &code, &previous, zend_ce_throwable) == FAILURE) { zend_error(E_EXCEPTION | E_ERROR, "Wrong parameters for %s([string $message [, long $code [, Throwable $previous = NULL]]])", base_ce->name->val); return; } + object = getThis(); + base_ce = zend_get_exception_base(object); + if (message) { zend_update_property_str(base_ce, object, "message", sizeof("message")-1, message); } @@ -257,7 +257,7 @@ ZEND_METHOD(error_exception, __construct) int argc = ZEND_NUM_ARGS(); size_t message_len, filename_len; - if (zend_parse_parameters_ex(ZEND_PARSE_PARAMS_QUIET, argc, "|sllslO!", &message, &message_len, &code, &severity, &filename, &filename_len, &lineno, &previous, default_exception_ce) == FAILURE) { + if (zend_parse_parameters_ex(ZEND_PARSE_PARAMS_QUIET, argc, "|sllslO!", &message, &message_len, &code, &severity, &filename, &filename_len, &lineno, &previous, zend_ce_throwable) == FAILURE) { zend_error(E_EXCEPTION | E_ERROR, "Wrong parameters for ErrorException([string $message [, long $code, [ long $severity, [ string $filename, [ long $lineno [, Throwable $previous = NULL]]]]]])"); return; } @@ -298,7 +298,7 @@ ZEND_METHOD(error_exception, __construct) #define GET_PROPERTY_SILENT(object, name) \ zend_read_property(zend_get_exception_base(object), (object), name, sizeof(name) - 1, 1, &rv) -/* {{{ proto string Exception::getFile() +/* {{{ proto string Exception|Error::getFile() Get the file in which the exception occurred */ ZEND_METHOD(exception, getFile) { @@ -310,7 +310,7 @@ ZEND_METHOD(exception, getFile) } /* }}} */ -/* {{{ proto int Exception::getLine() +/* {{{ proto int Exception|Error::getLine() Get the line in which the exception occurred */ ZEND_METHOD(exception, getLine) { @@ -322,7 +322,7 @@ ZEND_METHOD(exception, getLine) } /* }}} */ -/* {{{ proto string Exception::getMessage() +/* {{{ proto string Exception|Error::getMessage() Get the exception message */ ZEND_METHOD(exception, getMessage) { @@ -334,7 +334,7 @@ ZEND_METHOD(exception, getMessage) } /* }}} */ -/* {{{ proto int Exception::getCode() +/* {{{ proto int Exception|Error::getCode() Get the exception code */ ZEND_METHOD(exception, getCode) { @@ -346,7 +346,7 @@ ZEND_METHOD(exception, getCode) } /* }}} */ -/* {{{ proto array Exception::getTrace() +/* {{{ proto array Exception|Error::getTrace() Get the stack trace for the location in which the exception occurred */ ZEND_METHOD(exception, getTrace) { @@ -557,7 +557,7 @@ static void _build_trace_string(smart_str *str, HashTable *ht, uint32_t num) /* } /* }}} */ -/* {{{ proto string Exception::getTraceAsString() +/* {{{ proto string Exception|Error::getTraceAsString() Obtain the backtrace for the exception as a string (instead of an array) */ ZEND_METHOD(exception, getTraceAsString) { @@ -595,8 +595,8 @@ ZEND_METHOD(exception, getTraceAsString) } /* }}} */ -/* {{{ proto string Exception::getPrevious() - Return previous Exception or NULL. */ +/* {{{ proto Throwable Exception|Error::getPrevious() + Return previous Throwable or NULL. */ ZEND_METHOD(exception, getPrevious) { zval rv; @@ -630,7 +630,7 @@ zend_string *zend_strpprintf(size_t max_len, const char *format, ...) /* {{{ */ } /* }}} */ -/* {{{ proto string Exception::__toString() +/* {{{ proto string Exception|Error::__toString() Obtain the string representation of the Exception object */ ZEND_METHOD(exception, __toString) { From 103bf7eda084688139e121ec052dc9b7469e1a63 Mon Sep 17 00:00:00 2001 From: Aaron Piotrowski Date: Mon, 15 Jun 2015 01:47:34 -0500 Subject: [PATCH 13/18] Add Throwable tests --- Zend/tests/throwable_001.phpt | 18 ++++++++++++++++++ Zend/tests/throwable_002.phpt | 18 ++++++++++++++++++ Zend/tests/throwable_003.phpt | 11 +++++++++++ 3 files changed, 47 insertions(+) create mode 100644 Zend/tests/throwable_001.phpt create mode 100644 Zend/tests/throwable_002.phpt create mode 100644 Zend/tests/throwable_003.phpt diff --git a/Zend/tests/throwable_001.phpt b/Zend/tests/throwable_001.phpt new file mode 100644 index 0000000000000..afcdd7224c569 --- /dev/null +++ b/Zend/tests/throwable_001.phpt @@ -0,0 +1,18 @@ +--TEST-- +Test using an Error as the previous Throwable for an Exception +--CREDITS-- +Aaron Piotrowski +--FILE-- + +--EXPECTF-- + +Fatal error: Uncaught Error: Error message in %s:%d +Stack trace: +#0 {main} + +Next Exception: Exception message in %s:%d +Stack trace: +#0 {main} + thrown in %s on line %d diff --git a/Zend/tests/throwable_002.phpt b/Zend/tests/throwable_002.phpt new file mode 100644 index 0000000000000..10fd82bea5943 --- /dev/null +++ b/Zend/tests/throwable_002.phpt @@ -0,0 +1,18 @@ +--TEST-- +Test using an Exception as the previous Throwable for an Error +--CREDITS-- +Aaron Piotrowski +--FILE-- + +--EXPECTF-- + +Fatal error: Uncaught Exception: Exception message in %s:%d +Stack trace: +#0 {main} + +Next Error: Error message in %s:%d +Stack trace: +#0 {main} + thrown in %s on line %d diff --git a/Zend/tests/throwable_003.phpt b/Zend/tests/throwable_003.phpt new file mode 100644 index 0000000000000..19626a31865c2 --- /dev/null +++ b/Zend/tests/throwable_003.phpt @@ -0,0 +1,11 @@ +--TEST-- +Test user code implementing Throwable results in fatal error +--CREDITS-- +Aaron Piotrowski +--FILE-- + +--EXPECTF-- + +Fatal error: Class Failure cannot implement interface Throwable, extend Exception or Error instead in %s on line %d From 77cf6d81b46ef1378c9b431c17566c65deb7b79b Mon Sep 17 00:00:00 2001 From: Aaron Piotrowski Date: Mon, 15 Jun 2015 08:20:30 -0500 Subject: [PATCH 14/18] Fix some missed tests --- Zend/tests/bug69788.phpt | 2 +- ext/opcache/tests/optimize_func_calls.phpt | 2 +- ext/simplexml/tests/SimpleXMLElement_xpath_3.phpt | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Zend/tests/bug69788.phpt b/Zend/tests/bug69788.phpt index e48486625f539..63dd42d451110 100644 --- a/Zend/tests/bug69788.phpt +++ b/Zend/tests/bug69788.phpt @@ -1,5 +1,5 @@ --TEST-- -Bug #69788: Malformed script causes Uncaught EngineException in php-cgi, valgrind SIGILL +Bug #69788: Malformed script causes Uncaught Error in php-cgi, valgrind SIGILL --FILE-- --EXPECTF-- diff --git a/ext/opcache/tests/optimize_func_calls.phpt b/ext/opcache/tests/optimize_func_calls.phpt index 3f795f5fc6f0a..eee21b557cbf9 100644 --- a/ext/opcache/tests/optimize_func_calls.phpt +++ b/ext/opcache/tests/optimize_func_calls.phpt @@ -127,7 +127,7 @@ Array string(7) "changed" string(7) "changed" -Fatal error: Uncaught EngineException: Cannot pass parameter 1 by reference in %soptimize_func_calls.php:%d +Fatal error: Uncaught Error: Cannot pass parameter 1 by reference in %soptimize_func_calls.php:%d Stack trace: #0 {main} thrown in %soptimize_func_calls.php on line %d diff --git a/ext/simplexml/tests/SimpleXMLElement_xpath_3.phpt b/ext/simplexml/tests/SimpleXMLElement_xpath_3.phpt index e2997f19d1b2c..8ed21432852c8 100644 --- a/ext/simplexml/tests/SimpleXMLElement_xpath_3.phpt +++ b/ext/simplexml/tests/SimpleXMLElement_xpath_3.phpt @@ -15,7 +15,7 @@ Notice: Undefined variable: x in %s on line %d Warning: simplexml_load_string() expects parameter 3 to be integer, float given in %s on line %d -Fatal error: Uncaught EngineException: Call to a member function xpath() on null in %s:%d +Fatal error: Uncaught Error: Call to a member function xpath() on null in %s:%d Stack trace: #0 {main} thrown in %s on line %d From 0265cf5aeb99b48e07ffa4d5a2a340d4545952a1 Mon Sep 17 00:00:00 2001 From: Aaron Piotrowski Date: Mon, 15 Jun 2015 17:35:24 -0500 Subject: [PATCH 15/18] Check for zend_ce_throwable instead --- Zend/zend_exceptions.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Zend/zend_exceptions.c b/Zend/zend_exceptions.c index 1443afc3a2b8b..08342e9050456 100644 --- a/Zend/zend_exceptions.c +++ b/Zend/zend_exceptions.c @@ -926,7 +926,7 @@ ZEND_API void zend_exception_error(zend_object *ex, int severity) /* {{{ */ zend_string_release(file); zend_string_release(message); - } else if (instanceof_function(ce_exception, default_exception_ce) || instanceof_function(ce_exception, error_ce)) { + } else if (instanceof_function(ce_exception, zend_ce_throwable)) { zval tmp, rv; zend_string *str, *file = NULL; zend_long line = 0; From 47d838a7ca2f71d1222798917025b5d677acf083 Mon Sep 17 00:00:00 2001 From: Aaron Piotrowski Date: Mon, 15 Jun 2015 18:07:27 -0500 Subject: [PATCH 16/18] Move definition of Throwable to zend_exceptions.h/c Also moved REGISTER_ITERATOR_INTERFACE macro to zend_interfaces.h and renamed it to REGISTER_INTERFACE. --- Zend/zend_exceptions.c | 33 +++++++++++++++++++++++++++++ Zend/zend_exceptions.h | 2 ++ Zend/zend_interfaces.c | 48 +++++------------------------------------- Zend/zend_interfaces.h | 9 +++++++- 4 files changed, 48 insertions(+), 44 deletions(-) diff --git a/Zend/zend_exceptions.c b/Zend/zend_exceptions.c index 08342e9050456..6b1d41efb987f 100644 --- a/Zend/zend_exceptions.c +++ b/Zend/zend_exceptions.c @@ -30,6 +30,8 @@ #include "zend_dtrace.h" #include "zend_smart_str.h" +ZEND_API zend_class_entry *zend_ce_throwable; + static zend_class_entry *default_exception_ce; static zend_class_entry *error_exception_ce; static zend_class_entry *error_ce; @@ -38,6 +40,21 @@ static zend_class_entry *type_error_ce; static zend_object_handlers default_exception_handlers; ZEND_API void (*zend_throw_exception_hook)(zval *ex); +/* {{{ zend_implement_throwable */ +static int zend_implement_throwable(zend_class_entry *interface, zend_class_entry *class_type) +{ + if (instanceof_function(class_type, default_exception_ce) || instanceof_function(class_type, error_ce)) { + return SUCCESS; + } + zend_error_noreturn(E_ERROR, "Class %s cannot implement interface %s, extend %s or %s instead", + class_type->name->val, + interface->name->val, + default_exception_ce->name->val, + error_ce->name->val); + return FAILURE; +} +/* }}} */ + static inline zend_class_entry *zend_get_exception_base(zval *object) { return instanceof_function(Z_OBJCE_P(object), default_exception_ce) ? default_exception_ce : error_ce; @@ -710,6 +727,20 @@ ZEND_METHOD(exception, __toString) } /* }}} */ +/** {{{ Throwable method definition */ +const zend_function_entry zend_funcs_throwable[] = { + ZEND_ABSTRACT_ME(throwable, getMessage, NULL) + ZEND_ABSTRACT_ME(throwable, getCode, NULL) + ZEND_ABSTRACT_ME(throwable, getFile, NULL) + ZEND_ABSTRACT_ME(throwable, getLine, NULL) + ZEND_ABSTRACT_ME(throwable, getTrace, NULL) + ZEND_ABSTRACT_ME(throwable, getPrevious, NULL) + ZEND_ABSTRACT_ME(throwable, getTraceAsString, NULL) + ZEND_ABSTRACT_ME(throwable, __toString, NULL) + ZEND_FE_END +}; +/* }}} */ + /* {{{ internal structs */ /* All functions that may be used in uncaught exception handlers must be final * and must not throw exceptions. Otherwise we would need a facility to handle @@ -760,6 +791,8 @@ void zend_register_default_exception(void) /* {{{ */ { zend_class_entry ce; zend_property_info *prop; + + REGISTER_INTERFACE(throwable, Throwable); memcpy(&default_exception_handlers, zend_get_std_object_handlers(), sizeof(zend_object_handlers)); default_exception_handlers.clone_obj = NULL; diff --git a/Zend/zend_exceptions.h b/Zend/zend_exceptions.h index 6f7ceed78eb97..d22b99c262a39 100644 --- a/Zend/zend_exceptions.h +++ b/Zend/zend_exceptions.h @@ -26,6 +26,8 @@ BEGIN_EXTERN_C() +extern ZEND_API zend_class_entry *zend_ce_throwable; + ZEND_API void zend_exception_set_previous(zend_object *exception, zend_object *add_previous); ZEND_API void zend_exception_save(void); ZEND_API void zend_exception_restore(void); diff --git a/Zend/zend_interfaces.c b/Zend/zend_interfaces.c index e5b2d3f80e9bb..0e5942554f323 100644 --- a/Zend/zend_interfaces.c +++ b/Zend/zend_interfaces.c @@ -28,7 +28,6 @@ ZEND_API zend_class_entry *zend_ce_aggregate; ZEND_API zend_class_entry *zend_ce_iterator; ZEND_API zend_class_entry *zend_ce_arrayaccess; ZEND_API zend_class_entry *zend_ce_serializable; -ZEND_API zend_class_entry *zend_ce_throwable; /* {{{ zend_call_method Only returns the returned zval if retval_ptr != NULL */ @@ -503,21 +502,6 @@ static int zend_implement_serializable(zend_class_entry *interface, zend_class_e } /* }}}*/ -/* {{{ zend_implement_traversable */ -static int zend_implement_throwable(zend_class_entry *interface, zend_class_entry *class_type) -{ - if (instanceof_function(class_type, zend_exception_get_default()) || instanceof_function(class_type, zend_get_error())) { - return SUCCESS; - } - zend_error_noreturn(E_ERROR, "Class %s cannot implement interface %s, extend %s or %s instead", - class_type->name->val, - interface->name->val, - zend_exception_get_default()->name->val, - zend_get_error()->name->val); - return FAILURE; -} -/* }}} */ - /* {{{ function tables */ const zend_function_entry zend_funcs_aggregate[] = { ZEND_ABSTRACT_ME(iterator, getIterator, NULL) @@ -567,45 +551,23 @@ const zend_function_entry zend_funcs_serializable[] = { }; /* }}} */ -const zend_function_entry zend_funcs_throwable[] = { - ZEND_ABSTRACT_ME(throwable, getMessage, NULL) - ZEND_ABSTRACT_ME(throwable, getCode, NULL) - ZEND_ABSTRACT_ME(throwable, getFile, NULL) - ZEND_ABSTRACT_ME(throwable, getLine, NULL) - ZEND_ABSTRACT_ME(throwable, getTrace, NULL) - ZEND_ABSTRACT_ME(throwable, getPrevious, NULL) - ZEND_ABSTRACT_ME(throwable, getTraceAsString, NULL) - ZEND_ABSTRACT_ME(throwable, __toString, NULL) - ZEND_FE_END -}; - -#define REGISTER_ITERATOR_INTERFACE(class_name, class_name_str) \ - {\ - zend_class_entry ce;\ - INIT_CLASS_ENTRY(ce, # class_name_str, zend_funcs_ ## class_name) \ - zend_ce_ ## class_name = zend_register_internal_interface(&ce);\ - zend_ce_ ## class_name->interface_gets_implemented = zend_implement_ ## class_name;\ - } - #define REGISTER_ITERATOR_IMPLEMENT(class_name, interface_name) \ zend_class_implements(zend_ce_ ## class_name, 1, zend_ce_ ## interface_name) /* {{{ zend_register_interfaces */ ZEND_API void zend_register_interfaces(void) { - REGISTER_ITERATOR_INTERFACE(traversable, Traversable); + REGISTER_INTERFACE(traversable, Traversable); - REGISTER_ITERATOR_INTERFACE(aggregate, IteratorAggregate); + REGISTER_INTERFACE(aggregate, IteratorAggregate); REGISTER_ITERATOR_IMPLEMENT(aggregate, traversable); - REGISTER_ITERATOR_INTERFACE(iterator, Iterator); + REGISTER_INTERFACE(iterator, Iterator); REGISTER_ITERATOR_IMPLEMENT(iterator, traversable); - REGISTER_ITERATOR_INTERFACE(arrayaccess, ArrayAccess); - - REGISTER_ITERATOR_INTERFACE(serializable, Serializable); + REGISTER_INTERFACE(arrayaccess, ArrayAccess); - REGISTER_ITERATOR_INTERFACE(throwable, Throwable); + REGISTER_INTERFACE(serializable, Serializable); } /* }}} */ diff --git a/Zend/zend_interfaces.h b/Zend/zend_interfaces.h index daf0aae5dc141..d7b7645e162dc 100644 --- a/Zend/zend_interfaces.h +++ b/Zend/zend_interfaces.h @@ -31,7 +31,6 @@ extern ZEND_API zend_class_entry *zend_ce_aggregate; extern ZEND_API zend_class_entry *zend_ce_iterator; extern ZEND_API zend_class_entry *zend_ce_arrayaccess; extern ZEND_API zend_class_entry *zend_ce_serializable; -extern ZEND_API zend_class_entry *zend_ce_throwable; typedef struct _zend_user_iterator { zend_object_iterator it; @@ -50,6 +49,14 @@ ZEND_API zval* zend_call_method(zval *object_pp, zend_class_entry *obj_ce, zend_ #define zend_call_method_with_2_params(obj, obj_ce, fn_proxy, function_name, retval, arg1, arg2) \ zend_call_method(obj, obj_ce, fn_proxy, function_name, sizeof(function_name)-1, retval, 2, arg1, arg2) +#define REGISTER_INTERFACE(class_name, class_name_str) \ + {\ + zend_class_entry ce;\ + INIT_CLASS_ENTRY(ce, # class_name_str, zend_funcs_ ## class_name) \ + zend_ce_ ## class_name = zend_register_internal_interface(&ce);\ + zend_ce_ ## class_name->interface_gets_implemented = zend_implement_ ## class_name;\ + } + ZEND_API void zend_user_it_rewind(zend_object_iterator *_iter); ZEND_API int zend_user_it_valid(zend_object_iterator *_iter); ZEND_API void zend_user_it_get_current_key(zend_object_iterator *_iter, zval *key); From 47fda68b031f8d1b1f3ec97e635af0726e34bdb7 Mon Sep 17 00:00:00 2001 From: Aaron Piotrowski Date: Wed, 17 Jun 2015 13:28:27 -0500 Subject: [PATCH 17/18] Fix typo in UPGRADING --- UPGRADING | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/UPGRADING b/UPGRADING index b0eecfbd7b24d..4a5b9e4fe54de 100644 --- a/UPGRADING +++ b/UPGRADING @@ -328,8 +328,8 @@ Changes to error handling may need to be changed to account for this. * Some fatal errors and recoverable fatal errors now throw an Error instead. - As Error is a separate class from Exception, these exceptions will not caught - by existing try/catch blocks. + As Error is a separate class from Exception, these exceptions will not be + caught by existing try/catch blocks. For the recoverable fatal errors which have been converted into an exception, it is no longer possible to silently ignore the error from an error handler. From c5eb924e9e43c59b564549e149b59ad9a4bee74a Mon Sep 17 00:00:00 2001 From: Aaron Piotrowski Date: Wed, 17 Jun 2015 13:46:27 -0500 Subject: [PATCH 18/18] Rename interface macros Renamed REGISTER_INTERFACE (formerly REGISTER_ITERATOR_INTERFACE) to REGISTER_MAGIC_INTERFACE and renamed REGISTER_ITERATOR_IMPLEMENT to REGISTER_MAGIC_IMPLEMENT. Both have now been moved to zend_interfaces.h. --- Zend/zend_exceptions.c | 2 +- Zend/zend_interfaces.c | 17 +++++++---------- Zend/zend_interfaces.h | 5 ++++- 3 files changed, 12 insertions(+), 12 deletions(-) diff --git a/Zend/zend_exceptions.c b/Zend/zend_exceptions.c index 6b1d41efb987f..e731e2171828f 100644 --- a/Zend/zend_exceptions.c +++ b/Zend/zend_exceptions.c @@ -792,7 +792,7 @@ void zend_register_default_exception(void) /* {{{ */ zend_class_entry ce; zend_property_info *prop; - REGISTER_INTERFACE(throwable, Throwable); + REGISTER_MAGIC_INTERFACE(throwable, Throwable); memcpy(&default_exception_handlers, zend_get_std_object_handlers(), sizeof(zend_object_handlers)); default_exception_handlers.clone_obj = NULL; diff --git a/Zend/zend_interfaces.c b/Zend/zend_interfaces.c index 0e5942554f323..3b4d2042f13b1 100644 --- a/Zend/zend_interfaces.c +++ b/Zend/zend_interfaces.c @@ -551,23 +551,20 @@ const zend_function_entry zend_funcs_serializable[] = { }; /* }}} */ -#define REGISTER_ITERATOR_IMPLEMENT(class_name, interface_name) \ - zend_class_implements(zend_ce_ ## class_name, 1, zend_ce_ ## interface_name) - /* {{{ zend_register_interfaces */ ZEND_API void zend_register_interfaces(void) { - REGISTER_INTERFACE(traversable, Traversable); + REGISTER_MAGIC_INTERFACE(traversable, Traversable); - REGISTER_INTERFACE(aggregate, IteratorAggregate); - REGISTER_ITERATOR_IMPLEMENT(aggregate, traversable); + REGISTER_MAGIC_INTERFACE(aggregate, IteratorAggregate); + REGISTER_MAGIC_IMPLEMENT(aggregate, traversable); - REGISTER_INTERFACE(iterator, Iterator); - REGISTER_ITERATOR_IMPLEMENT(iterator, traversable); + REGISTER_MAGIC_INTERFACE(iterator, Iterator); + REGISTER_MAGIC_IMPLEMENT(iterator, traversable); - REGISTER_INTERFACE(arrayaccess, ArrayAccess); + REGISTER_MAGIC_INTERFACE(arrayaccess, ArrayAccess); - REGISTER_INTERFACE(serializable, Serializable); + REGISTER_MAGIC_INTERFACE(serializable, Serializable); } /* }}} */ diff --git a/Zend/zend_interfaces.h b/Zend/zend_interfaces.h index d7b7645e162dc..1f7b9b386097b 100644 --- a/Zend/zend_interfaces.h +++ b/Zend/zend_interfaces.h @@ -49,7 +49,7 @@ ZEND_API zval* zend_call_method(zval *object_pp, zend_class_entry *obj_ce, zend_ #define zend_call_method_with_2_params(obj, obj_ce, fn_proxy, function_name, retval, arg1, arg2) \ zend_call_method(obj, obj_ce, fn_proxy, function_name, sizeof(function_name)-1, retval, 2, arg1, arg2) -#define REGISTER_INTERFACE(class_name, class_name_str) \ +#define REGISTER_MAGIC_INTERFACE(class_name, class_name_str) \ {\ zend_class_entry ce;\ INIT_CLASS_ENTRY(ce, # class_name_str, zend_funcs_ ## class_name) \ @@ -57,6 +57,9 @@ ZEND_API zval* zend_call_method(zval *object_pp, zend_class_entry *obj_ce, zend_ zend_ce_ ## class_name->interface_gets_implemented = zend_implement_ ## class_name;\ } +#define REGISTER_MAGIC_IMPLEMENT(class_name, interface_name) \ + zend_class_implements(zend_ce_ ## class_name, 1, zend_ce_ ## interface_name) + ZEND_API void zend_user_it_rewind(zend_object_iterator *_iter); ZEND_API int zend_user_it_valid(zend_object_iterator *_iter); ZEND_API void zend_user_it_get_current_key(zend_object_iterator *_iter, zval *key);