allow to display all PHP errors

This commit is contained in:
Roland Gruber 2014-04-21 10:52:46 +00:00
parent e7434df3a1
commit 180d2a8800
3 changed files with 8 additions and 1 deletions

View File

@ -1463,6 +1463,8 @@ class LAMCfgMain {
const ERROR_REPORTING_DEFAULT = 'default';
/** PHP error reporting setting from php.ini */
const ERROR_REPORTING_SYSTEM = 'system';
/** PHP error reporting setting as E_ALL | E_STRICT */
const ERROR_REPORTING_ALL = 'all';
/** Default profile */
public $default;

View File

@ -69,6 +69,10 @@ function startSecureSession($redirectToLogin = true, $initSecureData = false) {
if (empty($_SESSION['cfgMain']) || ($_SESSION['cfgMain']->errorReporting == LAMCfgMain::ERROR_REPORTING_DEFAULT)) {
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
if (! isset($_SESSION["sec_session_id"]) || ($_SESSION["sec_session_id"] != session_id())) {
// session id is invalid

View File

@ -426,7 +426,8 @@ $loggingTable->addElement(new htmlInputField('logFile', $destinationPath), true)
$loggingTable->addElement(new htmlSpacer(null, '10px'), true);
$errorLogOptions = array(
_('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->setHasDescriptiveElements(true);