Fix: remove errors in php 5.4
This commit is contained in:
parent
4ecf7d9493
commit
a2fecc2616
@ -53,10 +53,8 @@ if (! defined('LOG_DEBUG'))
|
||||
}
|
||||
}
|
||||
|
||||
// Force PHP error_reporting setup (Dolibarr may report warning without this)
|
||||
if (! defined('E_DEPRECATED')) define('E_DEPRECATED',0); // For PHP < 5.3.0 compatibility
|
||||
error_reporting(E_ALL & ~(E_STRICT|E_NOTICE|E_DEPRECATED));
|
||||
//error_reporting(E_ALL | E_STRICT);
|
||||
// End of common declaration part
|
||||
if (defined('DOL_INC_FOR_VERSION_ERROR')) return;
|
||||
|
||||
|
||||
// Define vars
|
||||
@ -77,12 +75,19 @@ if (! $result && ! empty($_SERVER["GATEWAY_INTERFACE"])) // If install not do
|
||||
exit;
|
||||
}
|
||||
|
||||
// Force PHP error_reporting setup (Dolibarr may report warning without this)
|
||||
if (! empty($dolibarr_strict_mode))
|
||||
{
|
||||
error_reporting(E_ALL | E_STRICT);
|
||||
}
|
||||
else
|
||||
{
|
||||
if (! defined('E_DEPRECATED')) define('E_DEPRECATED',0); // For PHP < 5.3.0 compatibility
|
||||
error_reporting(E_ALL & ~(E_STRICT|E_NOTICE|E_DEPRECATED));
|
||||
}
|
||||
|
||||
// Disable php display errors
|
||||
if (! empty($dolibarr_main_prod))
|
||||
{
|
||||
ini_set('display_errors','Off');
|
||||
}
|
||||
if (! empty($dolibarr_main_prod)) ini_set('display_errors','Off');
|
||||
|
||||
// Clean parameters
|
||||
$dolibarr_main_data_root=trim($dolibarr_main_data_root);
|
||||
|
||||
@ -74,6 +74,8 @@ if (! empty($dolibarr_main_document_root_alt))
|
||||
}
|
||||
// Force db type (for test purpose)
|
||||
if (defined('TEST_DB_FORCE_TYPE')) $conf->db->type=constant('TEST_DB_FORCE_TYPE');
|
||||
// Force php strict mode (for debug)
|
||||
$conf->file->strict_mode = empty($dolibarr_strict_mode)?'':$dolibarr_strict_mode;
|
||||
// Force Multi-Company transverse mode
|
||||
$conf->multicompany->transverse_mode = empty($multicompany_transverse_mode)?'':$multicompany_transverse_mode;
|
||||
// Force entity in login page
|
||||
|
||||
Loading…
Reference in New Issue
Block a user