Merge branch 'QA_4_7'
This commit is contained in:
commit
5ad0c08868
@ -85,6 +85,7 @@ phpMyAdmin - ChangeLog
|
||||
- issue #13010 Copy database: SQL error for copying PMADB metadata
|
||||
- issue #13002 Fixed OpenDocument exports
|
||||
- issue #13000 Align NULL values according to the column alignment
|
||||
- issue #13021 Show phpMyAdmin errors even with error_reporting set to 0
|
||||
|
||||
4.6.6 (2017-01-23)
|
||||
- issue #12759 Fix Notice regarding 'Undefined index: old_usergroup'
|
||||
|
||||
@ -28,6 +28,11 @@ class ErrorHandler
|
||||
*/
|
||||
protected $hide_location = false;
|
||||
|
||||
/**
|
||||
* Initial error reporting state
|
||||
*/
|
||||
protected $error_reporting = 0;
|
||||
|
||||
/**
|
||||
* Constructor - set PHP error handler
|
||||
*
|
||||
@ -43,6 +48,7 @@ class ErrorHandler
|
||||
if (!defined('TESTSUITE')) {
|
||||
set_error_handler(array($this, 'handleError'));
|
||||
}
|
||||
$this->error_reporting = error_reporting();
|
||||
}
|
||||
|
||||
/**
|
||||
@ -149,8 +155,14 @@ class ErrorHandler
|
||||
*/
|
||||
public function handleError($errno, $errstr, $errfile, $errline)
|
||||
{
|
||||
// check if Error Control Operator (@) was used.
|
||||
if (error_reporting() == 0) {
|
||||
/**
|
||||
* Check if Error Control Operator (@) was used, but still show
|
||||
* user errors even in this case.
|
||||
*/
|
||||
if (error_reporting() == 0 &&
|
||||
$this->error_reporting != 0 &&
|
||||
($errno & (E_USER_WARNING | E_USER_ERROR | E_USER_NOTICE)) == 0
|
||||
) {
|
||||
return;
|
||||
}
|
||||
$this->addError($errstr, $errno, $errfile, $errline, true);
|
||||
|
||||
Loading…
Reference in New Issue
Block a user