allow to display all PHP errors
This commit is contained in:
parent
e7434df3a1
commit
180d2a8800
|
@ -1463,6 +1463,8 @@ class LAMCfgMain {
|
||||||
const ERROR_REPORTING_DEFAULT = 'default';
|
const ERROR_REPORTING_DEFAULT = 'default';
|
||||||
/** PHP error reporting setting from php.ini */
|
/** PHP error reporting setting from php.ini */
|
||||||
const ERROR_REPORTING_SYSTEM = 'system';
|
const ERROR_REPORTING_SYSTEM = 'system';
|
||||||
|
/** PHP error reporting setting as E_ALL | E_STRICT */
|
||||||
|
const ERROR_REPORTING_ALL = 'all';
|
||||||
|
|
||||||
/** Default profile */
|
/** Default profile */
|
||||||
public $default;
|
public $default;
|
||||||
|
|
|
@ -69,6 +69,10 @@ function startSecureSession($redirectToLogin = true, $initSecureData = false) {
|
||||||
if (empty($_SESSION['cfgMain']) || ($_SESSION['cfgMain']->errorReporting == LAMCfgMain::ERROR_REPORTING_DEFAULT)) {
|
if (empty($_SESSION['cfgMain']) || ($_SESSION['cfgMain']->errorReporting == LAMCfgMain::ERROR_REPORTING_DEFAULT)) {
|
||||||
ini_set('error_reporting', 'E_ALL & ~E_NOTICE');
|
ini_set('error_reporting', 'E_ALL & ~E_NOTICE');
|
||||||
}
|
}
|
||||||
|
elseif ($_SESSION['cfgMain']->errorReporting == LAMCfgMain::ERROR_REPORTING_ALL) {
|
||||||
|
ini_set('error_reporting', E_ALL | E_STRICT);
|
||||||
|
ini_set('display_errors', 'On');
|
||||||
|
}
|
||||||
// check session id
|
// check session id
|
||||||
if (! isset($_SESSION["sec_session_id"]) || ($_SESSION["sec_session_id"] != session_id())) {
|
if (! isset($_SESSION["sec_session_id"]) || ($_SESSION["sec_session_id"] != session_id())) {
|
||||||
// session id is invalid
|
// session id is invalid
|
||||||
|
|
|
@ -426,7 +426,8 @@ $loggingTable->addElement(new htmlInputField('logFile', $destinationPath), true)
|
||||||
$loggingTable->addElement(new htmlSpacer(null, '10px'), true);
|
$loggingTable->addElement(new htmlSpacer(null, '10px'), true);
|
||||||
$errorLogOptions = array(
|
$errorLogOptions = array(
|
||||||
_('PHP system setting') => LAMCfgMain::ERROR_REPORTING_SYSTEM,
|
_('PHP system setting') => LAMCfgMain::ERROR_REPORTING_SYSTEM,
|
||||||
_('default') => LAMCfgMain::ERROR_REPORTING_DEFAULT
|
_('default') => LAMCfgMain::ERROR_REPORTING_DEFAULT,
|
||||||
|
_('all') => LAMCfgMain::ERROR_REPORTING_ALL
|
||||||
);
|
);
|
||||||
$errorLogSelect = new htmlTableExtendedSelect('errorReporting', $errorLogOptions, array($cfg->errorReporting), _('PHP error reporting'), '244');
|
$errorLogSelect = new htmlTableExtendedSelect('errorReporting', $errorLogOptions, array($cfg->errorReporting), _('PHP error reporting'), '244');
|
||||||
$errorLogSelect->setHasDescriptiveElements(true);
|
$errorLogSelect->setHasDescriptiveElements(true);
|
||||||
|
|
Loading…
Reference in New Issue