]> granicus.if.org Git - php/commitdiff
Disable report_zend_debug by default
authorNikita Popov <nikita.ppv@gmail.com>
Wed, 12 Aug 2020 08:32:05 +0000 (10:32 +0200)
committerNikita Popov <nikita.ppv@gmail.com>
Wed, 12 Aug 2020 08:36:40 +0000 (10:36 +0200)
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.

main/main.c
php.ini-development
php.ini-production
sapi/cli/php_cli.c
sapi/litespeed/lsapi_main.c
sapi/phpdbg/phpdbg.c

index 9e0d4ba8822f6168a7ed07782fe9ba258bd7c34c..9ac65da922758ad02a4a462e51826ae7b496841a 100644 (file)
@@ -697,7 +697,7 @@ PHP_INI_BEGIN()
        STD_PHP_INI_BOOLEAN("ignore_repeated_errors",   "0",    PHP_INI_ALL,            OnUpdateBool,                   ignore_repeated_errors, php_core_globals,       core_globals)
        STD_PHP_INI_BOOLEAN("ignore_repeated_source",   "0",    PHP_INI_ALL,            OnUpdateBool,                   ignore_repeated_source, php_core_globals,       core_globals)
        STD_PHP_INI_BOOLEAN("report_memleaks",          "1",            PHP_INI_ALL,            OnUpdateBool,                   report_memleaks,                php_core_globals,       core_globals)
-       STD_PHP_INI_BOOLEAN("report_zend_debug",        "1",            PHP_INI_ALL,            OnUpdateBool,                   report_zend_debug,              php_core_globals,       core_globals)
+       STD_PHP_INI_BOOLEAN("report_zend_debug",        "0",            PHP_INI_ALL,            OnUpdateBool,                   report_zend_debug,              php_core_globals,       core_globals)
        STD_PHP_INI_ENTRY("output_buffering",           "0",            PHP_INI_PERDIR|PHP_INI_SYSTEM,  OnUpdateLong,   output_buffering,               php_core_globals,       core_globals)
        STD_PHP_INI_ENTRY("output_handler",                     NULL,           PHP_INI_PERDIR|PHP_INI_SYSTEM,  OnUpdateString, output_handler,         php_core_globals,       core_globals)
        STD_PHP_INI_BOOLEAN("register_argc_argv",       "1",            PHP_INI_PERDIR|PHP_INI_SYSTEM,  OnUpdateBool,   register_argc_argv,             php_core_globals,       core_globals)
index ba30258fd0e6adbf91642c3b5a3a44c97c874c34..b352f5056fbb78d595fddf017ec89582d4a92e15 100644 (file)
@@ -539,7 +539,7 @@ ignore_repeated_source = Off
 ; http://php.net/report-memleaks
 report_memleaks = On
 
-; This setting is on by default.
+; This setting is off by default.
 ;report_zend_debug = 0
 
 ; Turn off normal error reporting and emit XML-RPC error XML
index a2a22506a404a91e29ccf7745e5878f8c0176a19..61960ef807c5f7fea0bbed02288bd84f9c936f4a 100644 (file)
@@ -543,7 +543,7 @@ ignore_repeated_source = Off
 ; http://php.net/report-memleaks
 report_memleaks = On
 
-; This setting is on by default.
+; This setting is off by default.
 ;report_zend_debug = 0
 
 ; Turn off normal error reporting and emit XML-RPC error XML
index 34bf1aee38765e8007fb961f8d329a59368791c0..d28f5a5378b6e1e4dcb21d45b088536388555a0a 100644 (file)
@@ -420,7 +420,6 @@ static int php_cli_startup(sapi_module_struct *sapi_module) /* {{{ */
 static void sapi_cli_ini_defaults(HashTable *configuration_hash)
 {
        zval tmp;
-       INI_DEFAULT("report_zend_debug", "0");
        INI_DEFAULT("display_errors", "1");
 }
 /* }}} */
index 03419d5e978baa29aaa36f9baf6f2bfb25ef52f7..24703ef75c8ac4621bdb457b88fbe6b8a55ae5f5 100644 (file)
@@ -1219,7 +1219,6 @@ static int cli_main( int argc, char * argv[] )
 {
 
     static const char * ini_defaults[] = {
-        "report_zend_debug",    "0",
         "display_errors",       "1",
         "register_argc_argv",   "1",
         "html_errors",          "0",
index c0db5feda51790cefd7f87ad548bdb1b08f819bc..d817349941b45656423dabbb62af9591cfb42b09 100644 (file)
@@ -1062,17 +1062,6 @@ const char phpdbg_ini_hardcoded[] =
 "error_log=\n"
 "output_buffering=off\n\0";
 
-/* overwritable ini defaults must be set in phpdbg_ini_defaults() */
-#define INI_DEFAULT(name, value) \
-       ZVAL_NEW_STR(&tmp, zend_string_init(value, sizeof(value) - 1, 1)); \
-       zend_hash_str_update(configuration_hash, name, sizeof(name) - 1, &tmp);
-
-void phpdbg_ini_defaults(HashTable *configuration_hash) /* {{{ */
-{
-       zval tmp;
-       INI_DEFAULT("report_zend_debug", "0");
-} /* }}} */
-
 static void phpdbg_welcome(zend_bool cleaning) /* {{{ */
 {
        /* print blurb */
@@ -1567,7 +1556,7 @@ phpdbg_main:
                phpdbg->name = sapi_name;
        }
 
-       phpdbg->ini_defaults = phpdbg_ini_defaults;
+       phpdbg->ini_defaults = NULL;
        phpdbg->phpinfo_as_text = 1;
        phpdbg->php_ini_ignore_cwd = 1;