add error_handling conf for php 7
Dieser Commit ist enthalten in:
Ursprung
9738b3442e
Commit
65da8d4f49
|
@ -1,4 +1,5 @@
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Project:
|
* Project:
|
||||||
* Contenido Content Management System
|
* Contenido Content Management System
|
||||||
|
@ -17,7 +18,6 @@
|
||||||
*
|
*
|
||||||
* $Id: config.misc.php 390 2015-11-09 21:02:55Z oldperl $:
|
* $Id: config.misc.php 390 2015-11-09 21:02:55Z oldperl $:
|
||||||
*/
|
*/
|
||||||
|
|
||||||
if (!defined('CON_FRAMEWORK')) {
|
if (!defined('CON_FRAMEWORK')) {
|
||||||
die('Illegal call');
|
die('Illegal call');
|
||||||
}
|
}
|
||||||
|
@ -134,27 +134,30 @@ $cfg['AvailableCharsets'] = array(
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/* Don't display errors */
|
/* Don't display errors */
|
||||||
@ini_set("display_errors",false);
|
@ini_set("display_errors", false);
|
||||||
|
|
||||||
/* Log errors to a file */
|
/* Log errors to a file */
|
||||||
@ini_set("log_errors",true);
|
@ini_set("log_errors", true);
|
||||||
|
|
||||||
/* The file in which we write the error log */
|
/* The file in which we write the error log */
|
||||||
@ini_set("error_log",$cfg['path']['conlite_logs']."errorlog.txt");
|
@ini_set("error_log", $cfg['path']['conlite_logs'] . "errorlog.txt");
|
||||||
|
|
||||||
/* Report all errors except warnings */
|
/* Report all errors except warnings */
|
||||||
if($cfg["develop"]["show_errors"] && $_SERVER['SERVER_NAME'] == "localhost") {
|
if ($cfg["develop"]["show_errors"] && $_SERVER['SERVER_NAME'] == "localhost") {
|
||||||
error_reporting(E_ALL);
|
error_reporting(E_ALL);
|
||||||
} else {
|
} else {
|
||||||
if($cfg["develop"]["show_deprecated"]) {
|
if ($cfg["develop"]["show_deprecated"]) {
|
||||||
error_reporting (E_ALL ^E_NOTICE);
|
error_reporting(E_ALL ^ E_NOTICE);
|
||||||
} else {
|
} else {
|
||||||
if(version_compare(PHP_VERSION, '5.3.0', '<')) { // remove unknown deprecated for PHP < 5.3
|
if (version_compare(PHP_VERSION, '5.3.0', '<')) { // remove unknown deprecated for PHP < 5.3
|
||||||
error_reporting (E_ALL ^E_NOTICE);
|
error_reporting(E_ALL ^ E_NOTICE);
|
||||||
} else if(version_compare(PHP_VERSION, '5.4.0', '>=')) {
|
} else
|
||||||
error_reporting (E_ALL ^E_NOTICE ^E_DEPRECATED ^E_USER_DEPRECATED ^E_STRICT);
|
if (version_compare(PHP_VERSION, '7.0.0', '>=')) {
|
||||||
|
error_reporting(E_ALL ^ E_NOTICE ^ E_DEPRECATED ^ E_USER_DEPRECATED ^ E_WARNING);
|
||||||
|
} else if (version_compare(PHP_VERSION, '5.4.0', '>=')) {
|
||||||
|
error_reporting(E_ALL ^ E_NOTICE ^ E_DEPRECATED ^ E_USER_DEPRECATED ^ E_STRICT);
|
||||||
} else {
|
} else {
|
||||||
error_reporting (E_ALL ^E_NOTICE ^E_DEPRECATED ^E_USER_DEPRECATED);
|
error_reporting(E_ALL ^ E_NOTICE ^ E_DEPRECATED ^ E_USER_DEPRECATED);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Laden…
In neuem Issue referenzieren