Add configuration options display_errors, error_reporting in env.ini

This commit is contained in:
Herbert Saal
2014-03-12 16:10:00 -04:00
parent 94aaf566ad
commit 931bf5b850
4 changed files with 23 additions and 11 deletions

3
.gitignore vendored
View File

@@ -29,3 +29,6 @@ workflow/public_html/lib-dev/
session.data
behat.yml
workflow/engine/src/Tests/config.ini
shared/
tests/functional/pm3FunctionalTests.iml
tests/functional/target/

View File

@@ -111,7 +111,13 @@ class Bootstrap
}
// default configuration
$config = array('debug' => 0, 'debug_sql' => 0, 'debug_time' => 0, 'debug_calendar' => 0, 'wsdl_cache' => 1, 'memory_limit' => "256M", 'time_zone' => 'America/New_York', 'memcached' => 0, 'memcached_server' => '', 'default_skin' => 'neoclassic', 'default_lang' => 'en', 'proxy_host' => '', 'proxy_port' => '', 'proxy_user' => '', 'proxy_pass' => '' , 'size_log_file' => 5000000 , 'number_log_file' => 5, 'ie_cookie_lifetime' => 1);
$error_reporting_default = defined('E_DEPRECATED') ? E_ALL & ~E_DEPRECATED : E_ALL;
$error_reporting_default = defined('E_STRICT') ? $error_reporting_default & ~E_STRICT : $error_reporting_default;
$config = array('debug' => 0, 'debug_sql' => 0, 'debug_time' => 0, 'debug_calendar' => 0, 'wsdl_cache' => 1, 'memory_limit' => "256M",
'time_zone' => 'America/New_York', 'memcached' => 0, 'memcached_server' => '', 'default_skin' => 'neoclassic', 'default_lang' => 'en',
'proxy_host' => '', 'proxy_port' => '', 'proxy_user' => '', 'proxy_pass' => '' , 'size_log_file' => 5000000 , 'number_log_file' => 5,
'ie_cookie_lifetime' => 1, 'error_reporting' => $error_reporting_default, 'display_errors' => 'On');
// read the global env.ini configuration file
if ($readGlobalIniFile && ($globalConf = @parse_ini_file($globalIniFile)) !== false) {

View File

@@ -64,13 +64,14 @@
$config = System::getSystemConfiguration();
$e_all = defined('E_DEPRECATED') ? E_ALL & ~E_DEPRECATED : E_ALL;
$e_all = defined('E_STRICT') ? $e_all & ~E_STRICT : $e_all;
$e_all = $config['debug'] ? $e_all : $e_all & ~E_NOTICE;
//$e_all = defined('E_DEPRECATED') ? E_ALL & ~E_DEPRECATED : E_ALL;
//$e_all = defined('E_STRICT') ? $e_all & ~E_STRICT : $e_all;
//$e_all = $config['debug'] ? $e_all : $e_all & ~E_NOTICE;
//$e_all = E_ALL & ~ E_DEPRECATED & ~ E_STRICT & ~ E_NOTICE & ~E_WARNING;
// Do not change any of these settings directly, use env.ini instead
ini_set('display_errors', $config['debug']);
ini_set('error_reporting', $e_all);
ini_set( 'display_errors', $config['display_errors']);
ini_set( 'error_reporting', $config['error_reporting']);
ini_set('short_open_tag', 'On');
ini_set('default_charset', "UTF-8");
ini_set('memory_limit', $config['memory_limit']);

View File

@@ -277,6 +277,7 @@ define( 'PML_DOWNLOAD_URL', PML_SERVER . '/syspmLibrary/en/green/services/downlo
try {
Bootstrap::initVendors();
$config = Bootstrap::getSystemConfiguration();
//var_dump($config); die;
// starting session
if (isset($config['session.gc_maxlifetime'])) {
@@ -293,13 +294,14 @@ try {
}
//session_start();
$e_all = defined( 'E_DEPRECATED' ) ? E_ALL & ~ E_DEPRECATED : E_ALL;
$e_all = defined( 'E_STRICT' ) ? $e_all & ~ E_STRICT : $e_all;
$e_all = $config['debug'] ? $e_all : $e_all & ~ E_NOTICE;
//$e_all = defined( 'E_DEPRECATED' ) ? E_ALL & ~ E_DEPRECATED : E_ALL;
//$e_all = defined( 'E_STRICT' ) ? $e_all & ~ E_STRICT : $e_all;
//$e_all = $config['debug'] ? $e_all : $e_all & ~ E_NOTICE;
//$e_all = E_ALL & ~ E_DEPRECATED & ~ E_STRICT & ~ E_NOTICE & ~E_WARNING;
// Do not change any of these settings directly, use env.ini instead
ini_set( 'display_errors', $config['debug'] );
ini_set( 'error_reporting', $e_all );
ini_set( 'display_errors', $config['display_errors']);
ini_set( 'error_reporting', $config['error_reporting']);
ini_set( 'short_open_tag', 'On' );
ini_set( 'default_charset', "UTF-8" );
ini_set( 'memory_limit', $config['memory_limit'] );