summaryrefslogtreecommitdiff
path: root/Zend
diff options
context:
space:
mode:
Diffstat (limited to 'Zend')
-rw-r--r--Zend/tests/015.phpt14
-rw-r--r--Zend/zend.c1
-rw-r--r--Zend/zend_builtin_functions.c1
-rw-r--r--Zend/zend_constants.c1
-rw-r--r--Zend/zend_errors.h3
5 files changed, 13 insertions, 7 deletions
diff --git a/Zend/tests/015.phpt b/Zend/tests/015.phpt
index a838e19da8..54914a5e8e 100644
--- a/Zend/tests/015.phpt
+++ b/Zend/tests/015.phpt
@@ -9,20 +9,19 @@ var_dump(trigger_error(array()));
var_dump(trigger_error("error", -1));
var_dump(trigger_error("error", 0));
var_dump(trigger_error("error", E_USER_WARNING));
+var_dump(trigger_error("error", E_USER_DEPRECATED));
echo "Done\n";
?>
---EXPECTF--
-Warning: Wrong parameter count for trigger_error() in %s on line %d
+--EXPECTF--
+Warning: trigger_error() expects at least 1 parameter, 0 given in %s on line %d
NULL
Notice: error in %s on line %d
bool(true)
-Notice: Array to string conversion in %s on line %d
-
-Notice: Array in %s on line %d
-bool(true)
+Warning: trigger_error() expects parameter 1 to be string (Unicode or binary), array given in %s on line %d
+NULL
Warning: Invalid error type specified in %s on line %d
bool(false)
@@ -32,4 +31,7 @@ bool(false)
Warning: error in %s on line %d
bool(true)
+
+Deprecated: error in %s on line %d
+bool(true)
Done
diff --git a/Zend/zend.c b/Zend/zend.c
index e2a1cacfe5..b232bd32be 100644
--- a/Zend/zend.c
+++ b/Zend/zend.c
@@ -1521,6 +1521,7 @@ ZEND_API void zend_error(int type, const char *format, ...) /* {{{ */
case E_USER_ERROR:
case E_USER_WARNING:
case E_USER_NOTICE:
+ case E_USER_DEPRECATED:
case E_RECOVERABLE_ERROR:
if (zend_is_compiling(TSRMLS_C)) {
error_filename = zend_get_compiled_filename(TSRMLS_C);
diff --git a/Zend/zend_builtin_functions.c b/Zend/zend_builtin_functions.c
index a5971ec33f..b985181c10 100644
--- a/Zend/zend_builtin_functions.c
+++ b/Zend/zend_builtin_functions.c
@@ -1480,6 +1480,7 @@ ZEND_FUNCTION(trigger_error)
case E_USER_ERROR:
case E_USER_WARNING:
case E_USER_NOTICE:
+ case E_USER_DEPRECATED:
break;
default:
zend_error(E_WARNING, "Invalid error type specified");
diff --git a/Zend/zend_constants.c b/Zend/zend_constants.c
index 59f9a60d10..4e433b97b4 100644
--- a/Zend/zend_constants.c
+++ b/Zend/zend_constants.c
@@ -112,6 +112,7 @@ void zend_register_standard_constants(TSRMLS_D) /* {{{ */
REGISTER_MAIN_LONG_CONSTANT("E_USER_ERROR", E_USER_ERROR, CONST_PERSISTENT | CONST_CS);
REGISTER_MAIN_LONG_CONSTANT("E_USER_WARNING", E_USER_WARNING, CONST_PERSISTENT | CONST_CS);
REGISTER_MAIN_LONG_CONSTANT("E_USER_NOTICE", E_USER_NOTICE, CONST_PERSISTENT | CONST_CS);
+ REGISTER_MAIN_LONG_CONSTANT("E_USER_DEPRECATED", E_USER_DEPRECATED, CONST_PERSISTENT | CONST_CS);
REGISTER_MAIN_LONG_CONSTANT("E_ALL", E_ALL, CONST_PERSISTENT | CONST_CS);
diff --git a/Zend/zend_errors.h b/Zend/zend_errors.h
index 5dbf0ad6c1..9b7b3e37da 100644
--- a/Zend/zend_errors.h
+++ b/Zend/zend_errors.h
@@ -36,8 +36,9 @@
#define E_STRICT (1<<11L)
#define E_RECOVERABLE_ERROR (1<<12L)
#define E_DEPRECATED (1<<13L)
+#define E_USER_DEPRECATED (1<<14L)
-#define E_ALL (E_ERROR | E_WARNING | E_PARSE | E_NOTICE | E_CORE_ERROR | E_CORE_WARNING | E_COMPILE_ERROR | E_COMPILE_WARNING | E_USER_ERROR | E_USER_WARNING | E_USER_NOTICE | E_STRICT | E_RECOVERABLE_ERROR | E_DEPRECATED)
+#define E_ALL (E_ERROR | E_WARNING | E_PARSE | E_NOTICE | E_CORE_ERROR | E_CORE_WARNING | E_COMPILE_ERROR | E_COMPILE_WARNING | E_USER_ERROR | E_USER_WARNING | E_USER_NOTICE | E_STRICT | E_RECOVERABLE_ERROR | E_DEPRECATED | E_USER_DEPRECATED)
#define E_CORE (E_CORE_ERROR | E_CORE_WARNING)
#endif /* ZEND_ERRORS_H */