summaryrefslogtreecommitdiff
path: root/Zend/zend.c
diff options
context:
space:
mode:
Diffstat (limited to 'Zend/zend.c')
-rw-r--r--Zend/zend.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/Zend/zend.c b/Zend/zend.c
index aef5a398b1..4b001c522c 100644
--- a/Zend/zend.c
+++ b/Zend/zend.c
@@ -160,6 +160,20 @@ static ZEND_INI_MH(OnUpdateAssertions) /* {{{ */
}
/* }}} */
+static ZEND_INI_MH(OnSetExceptionStringParamMaxLen) /* {{{ */
+{
+ zend_long i;
+
+ ZEND_ATOL(i, ZSTR_VAL(new_value));
+ if (i >= 0 && i <= 1000000) {
+ EG(exception_string_param_max_len) = i;
+ return SUCCESS;
+ } else {
+ return FAILURE;
+ }
+}
+/* }}} */
+
#if ZEND_DEBUG
# define SIGNAL_CHECK_DEFAULT "1"
#else
@@ -177,6 +191,7 @@ ZEND_INI_BEGIN()
STD_ZEND_INI_BOOLEAN("zend.signal_check", SIGNAL_CHECK_DEFAULT, ZEND_INI_SYSTEM, OnUpdateBool, check, zend_signal_globals_t, zend_signal_globals)
#endif
STD_ZEND_INI_BOOLEAN("zend.exception_ignore_args", "0", ZEND_INI_ALL, OnUpdateBool, exception_ignore_args, zend_executor_globals, executor_globals)
+ STD_ZEND_INI_ENTRY("zend.exception_string_param_max_len", "15", ZEND_INI_ALL, OnSetExceptionStringParamMaxLen, exception_string_param_max_len, zend_executor_globals, executor_globals)
ZEND_INI_END()
ZEND_API size_t zend_vspprintf(char **pbuf, size_t max_len, const char *format, va_list ap) /* {{{ */