Skip to content

Commit 824541d

Browse files
committed
Disable report_zend_debug by default
We might just want to drop this completely, but at least don't enable it by default. It already gets disabled by a number of SAPIs, but we should make that the default state.
1 parent 1e9a5c6 commit 824541d

File tree

6 files changed

+4
-17
lines changed

6 files changed

+4
-17
lines changed

main/main.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -697,7 +697,7 @@ PHP_INI_BEGIN()
697697
STD_PHP_INI_BOOLEAN("ignore_repeated_errors", "0", PHP_INI_ALL, OnUpdateBool, ignore_repeated_errors, php_core_globals, core_globals)
698698
STD_PHP_INI_BOOLEAN("ignore_repeated_source", "0", PHP_INI_ALL, OnUpdateBool, ignore_repeated_source, php_core_globals, core_globals)
699699
STD_PHP_INI_BOOLEAN("report_memleaks", "1", PHP_INI_ALL, OnUpdateBool, report_memleaks, php_core_globals, core_globals)
700-
STD_PHP_INI_BOOLEAN("report_zend_debug", "1", PHP_INI_ALL, OnUpdateBool, report_zend_debug, php_core_globals, core_globals)
700+
STD_PHP_INI_BOOLEAN("report_zend_debug", "0", PHP_INI_ALL, OnUpdateBool, report_zend_debug, php_core_globals, core_globals)
701701
STD_PHP_INI_ENTRY("output_buffering", "0", PHP_INI_PERDIR|PHP_INI_SYSTEM, OnUpdateLong, output_buffering, php_core_globals, core_globals)
702702
STD_PHP_INI_ENTRY("output_handler", NULL, PHP_INI_PERDIR|PHP_INI_SYSTEM, OnUpdateString, output_handler, php_core_globals, core_globals)
703703
STD_PHP_INI_BOOLEAN("register_argc_argv", "1", PHP_INI_PERDIR|PHP_INI_SYSTEM, OnUpdateBool, register_argc_argv, php_core_globals, core_globals)

php.ini-development

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -539,7 +539,7 @@ ignore_repeated_source = Off
539539
; http://php.net/report-memleaks
540540
report_memleaks = On
541541

542-
; This setting is on by default.
542+
; This setting is off by default.
543543
;report_zend_debug = 0
544544

545545
; Turn off normal error reporting and emit XML-RPC error XML

php.ini-production

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -543,7 +543,7 @@ ignore_repeated_source = Off
543543
; http://php.net/report-memleaks
544544
report_memleaks = On
545545

546-
; This setting is on by default.
546+
; This setting is off by default.
547547
;report_zend_debug = 0
548548

549549
; Turn off normal error reporting and emit XML-RPC error XML

sapi/cli/php_cli.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -420,7 +420,6 @@ static int php_cli_startup(sapi_module_struct *sapi_module) /* {{{ */
420420
static void sapi_cli_ini_defaults(HashTable *configuration_hash)
421421
{
422422
zval tmp;
423-
INI_DEFAULT("report_zend_debug", "0");
424423
INI_DEFAULT("display_errors", "1");
425424
}
426425
/* }}} */

sapi/litespeed/lsapi_main.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1219,7 +1219,6 @@ static int cli_main( int argc, char * argv[] )
12191219
{
12201220

12211221
static const char * ini_defaults[] = {
1222-
"report_zend_debug", "0",
12231222
"display_errors", "1",
12241223
"register_argc_argv", "1",
12251224
"html_errors", "0",

sapi/phpdbg/phpdbg.c

Lines changed: 1 addition & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1062,17 +1062,6 @@ const char phpdbg_ini_hardcoded[] =
10621062
"error_log=\n"
10631063
"output_buffering=off\n\0";
10641064

1065-
/* overwritable ini defaults must be set in phpdbg_ini_defaults() */
1066-
#define INI_DEFAULT(name, value) \
1067-
ZVAL_NEW_STR(&tmp, zend_string_init(value, sizeof(value) - 1, 1)); \
1068-
zend_hash_str_update(configuration_hash, name, sizeof(name) - 1, &tmp);
1069-
1070-
void phpdbg_ini_defaults(HashTable *configuration_hash) /* {{{ */
1071-
{
1072-
zval tmp;
1073-
INI_DEFAULT("report_zend_debug", "0");
1074-
} /* }}} */
1075-
10761065
static void phpdbg_welcome(zend_bool cleaning) /* {{{ */
10771066
{
10781067
/* print blurb */
@@ -1567,7 +1556,7 @@ int main(int argc, char **argv) /* {{{ */
15671556
phpdbg->name = sapi_name;
15681557
}
15691558

1570-
phpdbg->ini_defaults = phpdbg_ini_defaults;
1559+
phpdbg->ini_defaults = NULL;
15711560
phpdbg->phpinfo_as_text = 1;
15721561
phpdbg->php_ini_ignore_cwd = 1;
15731562

0 commit comments

Comments
 (0)