mirror of
https://github.com/php/php-src.git
synced 2026-04-26 09:28:21 +02:00
- disable html_errors per default as suggested by php.ini-<xxx>
- new error format that does not point to any documentation (if either not html_errors or no docref_root given e.g.: production boxes and default) - documentation update in php.ini-<xxx> # hope everyone is happy now # and why on earth was enabling html_errors default?
This commit is contained in:
+5
-2
@@ -272,7 +272,7 @@ PHP_INI_BEGIN()
|
||||
STD_PHP_INI_BOOLEAN("expose_php", "1", PHP_INI_SYSTEM, OnUpdateBool, expose_php, php_core_globals, core_globals)
|
||||
STD_PHP_INI_ENTRY("docref_root", "http://www.php.net/", PHP_INI_ALL, OnUpdateString, docref_root, php_core_globals, core_globals)
|
||||
STD_PHP_INI_ENTRY("docref_ext", "", PHP_INI_ALL, OnUpdateString, docref_ext, php_core_globals, core_globals)
|
||||
STD_PHP_INI_BOOLEAN("html_errors", "1", PHP_INI_ALL, OnUpdateBool, html_errors, php_core_globals, core_globals)
|
||||
STD_PHP_INI_BOOLEAN("html_errors", "0", PHP_INI_ALL, OnUpdateBool, html_errors, php_core_globals, core_globals)
|
||||
STD_PHP_INI_BOOLEAN("xmlrpc_errors", "0", PHP_INI_SYSTEM, OnUpdateBool, xmlrpc_errors, php_core_globals, core_globals)
|
||||
STD_PHP_INI_ENTRY("xmlrpc_error_number", "0", PHP_INI_ALL, OnUpdateLong, xmlrpc_error_number, php_core_globals, core_globals)
|
||||
STD_PHP_INI_ENTRY("max_input_time", "-1", PHP_INI_SYSTEM|PHP_INI_PERDIR, OnUpdateLong, max_input_time, php_core_globals, core_globals)
|
||||
@@ -489,7 +489,10 @@ PHPAPI void php_verror(const char *docref, const char *params, int type, const c
|
||||
}
|
||||
}
|
||||
}
|
||||
if (PG(html_errors)) {
|
||||
if (!PG(html_errors) || !strlen(PG(docref_root))) {
|
||||
/* no docref and no html errors -> do not point to any documentation (e.g. production boxes) */
|
||||
php_error(type, "%s(%s): %s", get_active_function_name(TSRMLS_C), params, buffer);
|
||||
} else if (PG(html_errors)) {
|
||||
php_error(type, "%s(%s) [<a href='%s%s%s'>%s</a>]: %s", get_active_function_name(TSRMLS_C), params, docref_root, docref, docref_target, docref, buffer);
|
||||
} else {
|
||||
php_error(type, "%s(%s) [%s%s%s]: %s", get_active_function_name(TSRMLS_C), params, docref_root, docref, docref_target, buffer);
|
||||
|
||||
@@ -303,6 +303,7 @@ report_memleaks = On
|
||||
track_errors = Off
|
||||
|
||||
; Disable the inclusion of HTML tags in error messages.
|
||||
; Note: Never use this feature for production boxes.
|
||||
;html_errors = Off
|
||||
|
||||
; If html_errors is set On PHP produces clickable error messages that direct
|
||||
@@ -311,6 +312,7 @@ track_errors = Off
|
||||
; and change docref_root to the base URL of your local copy including the
|
||||
; leading '/'. You must also specify the file extension being used including
|
||||
; the dot.
|
||||
; Note: Never use this feature for production boxes.
|
||||
;docref_root = /phpmanual/
|
||||
;docref_ext = .html
|
||||
|
||||
|
||||
@@ -318,6 +318,7 @@ report_memleaks = On
|
||||
track_errors = Off
|
||||
|
||||
; Disable the inclusion of HTML tags in error messages.
|
||||
; Note: Never use this feature for production boxes.
|
||||
;html_errors = Off
|
||||
|
||||
; If html_errors is set On PHP produces clickable error messages that direct
|
||||
@@ -326,6 +327,7 @@ track_errors = Off
|
||||
; and change docref_root to the base URL of your local copy including the
|
||||
; leading '/'. You must also specify the file extension being used including
|
||||
; the dot.
|
||||
; Note: Never use this feature for production boxes.
|
||||
;docref_root = /phpmanual/
|
||||
;docref_ext = .html
|
||||
|
||||
|
||||
Reference in New Issue
Block a user