diff --git a/ChangeLog b/ChangeLog index 6d092f9f18..a33e9df8a4 100644 --- a/ChangeLog +++ b/ChangeLog @@ -21,7 +21,8 @@ phpMyAdmin - ChangeLog - bug Undefined index central_columnswork - bug #4657 Don't have default blowfish_secret - bug #4656 Some error popups fade away too quickly -- bug #4648 Consistency in borders +- bug #4648 Consistency in borders +- bug $cfg['Error_Handler']['display'] no longer necessary 4.3.2.0 (2014-12-12) - bug #4628 PHP error while exporting schema as PDF diff --git a/doc/config.rst b/doc/config.rst index 4c4c068b41..d513521813 100644 --- a/doc/config.rst +++ b/doc/config.rst @@ -2744,13 +2744,6 @@ Developer Enable to let server present itself as demo server. This is used for . -.. config:option:: $cfg['Error_Handler']['display'] - - :type: boolean - :default: false - - Whether to display errors from PHP or not. - .. config:option:: $cfg['RowActionType'] :type: string diff --git a/libraries/Error_Handler.class.php b/libraries/Error_Handler.class.php index ad954e1c9a..5cffd9880f 100644 --- a/libraries/Error_Handler.class.php +++ b/libraries/Error_Handler.class.php @@ -298,9 +298,7 @@ class PMA_Error_Handler { $retval = ''; // display errors if SendErrorReports is set to 'ask'. - if ($GLOBALS['cfg']['SendErrorReports'] != 'never' - || $GLOBALS['cfg']['Error_Handler']['display'] - ) { + if ($GLOBALS['cfg']['SendErrorReports'] != 'never') { foreach ($this->getErrors() as $error) { if ($error instanceof PMA_Error) { if (! $error->isDisplayed()) { @@ -448,9 +446,7 @@ class PMA_Error_Handler */ public function countDisplayErrors() { - if ($GLOBALS['cfg']['SendErrorReports'] != 'never' - || $GLOBALS['cfg']['Error_Handler']['display'] - ) { + if ($GLOBALS['cfg']['SendErrorReports'] != 'never') { return $this->countErrors(); } else { return $this->countUserErrors(); @@ -492,8 +488,7 @@ class PMA_Error_Handler public function hasErrorsForPrompt() { return ( - ($GLOBALS['cfg']['SendErrorReports'] != 'never' - || $GLOBALS['cfg']['Error_Handler']['display']) + $GLOBALS['cfg']['SendErrorReports'] != 'never' && $this->countErrors() != $this->countUserErrors() ); } diff --git a/libraries/common.inc.php b/libraries/common.inc.php index 7ab877158f..9c468eec51 100644 --- a/libraries/common.inc.php +++ b/libraries/common.inc.php @@ -67,7 +67,6 @@ require './libraries/Error_Handler.class.php'; * initialize the error handler */ $GLOBALS['error_handler'] = new PMA_Error_Handler(); -$cfg['Error_Handler']['display'] = true; /** * This setting was removed in PHP 5.4. But at this point PMA_PHP_INT_VERSION diff --git a/libraries/config.default.php b/libraries/config.default.php index a6657f9cc5..e4f38be69a 100644 --- a/libraries/config.default.php +++ b/libraries/config.default.php @@ -813,26 +813,6 @@ $cfg['CaptchaLoginPublicKey'] = ''; */ $cfg['CaptchaLoginPrivateKey'] = ''; -/******************************************************************************* - * Error handler configuration - * - * this configures phpMyAdmin's own error handler, it is used to avoid information - * disclosure, gather errors for logging, reporting and displaying - * - * @global array $cfg['Error_Handler'] - */ -$cfg['Error_Handler'] = array(); - -/** - * whether to display errors or not - * - * this does not affect errors of type E_USER_* - * - * @global boolean $cfg['Error_Handler']['display'] - */ -$cfg['Error_Handler']['display'] = false; - - /******************************************************************************* * Navigation panel setup */ diff --git a/libraries/config/messages.inc.php b/libraries/config/messages.inc.php index 598a341cd4..9277060873 100644 --- a/libraries/config/messages.inc.php +++ b/libraries/config/messages.inc.php @@ -97,7 +97,6 @@ $strConfigDisableMultiTableMaintenance_desc = __( . 'the selected tables of a database.' ); $strConfigDisableMultiTableMaintenance_name = __('Disable multi table maintenance'); -$strConfigError_Handler_display_name = __('Display errors'); $strConfigExecTimeLimit_desc = __( 'Set the number of seconds a script is allowed to run ([kbd]0[/kbd] for no ' . 'limit).' diff --git a/libraries/config/setup.forms.php b/libraries/config/setup.forms.php index f95325421d..28f146740d 100644 --- a/libraries/config/setup.forms.php +++ b/libraries/config/setup.forms.php @@ -123,7 +123,6 @@ $forms['Features']['Warnings'] = array( 'SuhosinDisableWarning'); $forms['Features']['Developer'] = array( 'UserprefsDeveloperTab', - 'Error_Handler/display', 'DBG/sql'); $forms['Features']['Other_core_settings'] = array( 'NaturalOrder', diff --git a/libraries/config/user_preferences.forms.php b/libraries/config/user_preferences.forms.php index 1fdaf0d32c..02241c8c89 100644 --- a/libraries/config/user_preferences.forms.php +++ b/libraries/config/user_preferences.forms.php @@ -58,7 +58,6 @@ $forms['Features']['Warnings'] = array( // settings from this form are treated specially, // see prefs_forms.php and user_preferences.lib.php $forms['Features']['Developer'] = array( - 'Error_Handler/display', 'DBG/sql'); $forms['Sql_queries']['Sql_queries'] = array( 'ShowSQL', diff --git a/libraries/user_preferences.lib.php b/libraries/user_preferences.lib.php index 61b7cca884..94b91e8204 100644 --- a/libraries/user_preferences.lib.php +++ b/libraries/user_preferences.lib.php @@ -152,8 +152,6 @@ function PMA_applyUserprefs(array $config_data) $blacklist = array_flip($GLOBALS['cfg']['UserprefsDisallow']); if (!$GLOBALS['cfg']['UserprefsDeveloperTab']) { // disallow everything in the Developers tab - $blacklist['Error_Handler/display'] = true; - $blacklist['Error_Handler/gather'] = true; $blacklist['DBG/sql'] = true; } $whitelist = array_flip(PMA_readUserprefsFieldNames()); diff --git a/test/classes/PMA_Error_Handler_test.php b/test/classes/PMA_Error_Handler_test.php index 1dac61d4c1..64ecf458ec 100644 --- a/test/classes/PMA_Error_Handler_test.php +++ b/test/classes/PMA_Error_Handler_test.php @@ -118,8 +118,6 @@ class PMA_Error_Handler_Test extends PHPUnit_Framework_TestCase ) { // TODO: Add other test cases for all combination of 'sendErrorReports' $GLOBALS['cfg']['SendErrorReports'] = 'never'; - $GLOBALS['cfg']['Error_Handler']['gather'] = true; - $GLOBALS['cfg']['Error_Handler']['display'] = false; $this->object->handleError($errno, $errstr, $errfile, $errline); @@ -151,9 +149,6 @@ class PMA_Error_Handler_Test extends PHPUnit_Framework_TestCase public function testGetDispErrorsForDisplayTrue( $errno, $errstr, $errfile, $errline, $output_show, $output_hide ) { - $GLOBALS['cfg']['Error_Handler']['gather'] = true; - $GLOBALS['cfg']['Error_Handler']['display'] = true; - $this->object->handleError($errno, $errstr, $errfile, $errline); $this->assertContains( @@ -251,7 +246,6 @@ class PMA_Error_Handler_Test extends PHPUnit_Framework_TestCase */ public function testCountDisplayErrorsForDisplayTrue() { - $GLOBALS['cfg']['Error_Handler']['display'] = true; $this->assertEquals( 0, $this->object->countDisplayErrors() @@ -265,7 +259,6 @@ class PMA_Error_Handler_Test extends PHPUnit_Framework_TestCase */ public function testCountDisplayErrorsForDisplayFalse() { - $GLOBALS['cfg']['Error_Handler']['display'] = false; $this->assertEquals( 0, $this->object->countDisplayErrors() @@ -279,7 +272,6 @@ class PMA_Error_Handler_Test extends PHPUnit_Framework_TestCase */ public function testHasDisplayErrors() { - $GLOBALS['cfg']['Error_Handler']['display'] = false; $this->assertFalse($this->object->hasDisplayErrors()); } } diff --git a/test/classes/PMA_Footer_test.php b/test/classes/PMA_Footer_test.php index 8f2716fe1b..0f64889e73 100644 --- a/test/classes/PMA_Footer_test.php +++ b/test/classes/PMA_Footer_test.php @@ -59,8 +59,6 @@ class PMA_Footer_Test extends PHPUnit_Framework_TestCase $GLOBALS['PMA_Config'] = new PMA_Config(); $GLOBALS['PMA_Config']->enableBc(); $GLOBALS['collation_connection'] = 'utf8_general_ci'; - $GLOBALS['cfg']['Error_Handler']['gather'] = false; - $GLOBALS['cfg']['Error_Handler']['display'] = false; $GLOBALS['cfg']['Server']['verbose'] = 'verbose host'; $GLOBALS['cfg']['DefaultTabDatabase'] = 'db_structure.php'; $GLOBALS['server'] = '1';