From 122d759618a42bff105971b923fbbb5be02e34b9 Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Thu, 2 Apr 2015 18:52:32 +0200 Subject: Always throw TypeException on throwing zpp failures Introduces a ZEND_PARSE_PARAMS_THROW flag for zpp, which forces to report FAILURE errors using a TypeException instead of a Warning, like it would happen in strict mode. Adds a zend_parse_parameters_throw() convenience function, which invokes zpp with this flag. Converts all cases I could identify, where we currently have throwing zpp usage in constructors and replaces them with this API. Error handling is still replaced to EH_THROW in some cases to handle other, domain-specific errors in constructors. --- Zend/zend.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'Zend/zend.h') diff --git a/Zend/zend.h b/Zend/zend.h index db132a583a..a9e65ae7ed 100644 --- a/Zend/zend.h +++ b/Zend/zend.h @@ -286,7 +286,7 @@ extern ZEND_API zend_string *(*zend_resolve_path)(const char *filename, int file ZEND_API void zend_error(int type, const char *format, ...) ZEND_ATTRIBUTE_FORMAT(printf, 2, 3); ZEND_API void zend_type_error(const char *format, ...); -ZEND_API void zend_internal_type_error(zend_bool strict, const char *format, ...); +ZEND_API void zend_internal_type_error(zend_bool throw_exception, const char *format, ...); void zenderror(const char *error); -- cgit v1.2.1