From 65da8d4f49a503333cf4934b28ef6a356021b782 Mon Sep 17 00:00:00 2001 From: Oldperl <44996956+oldperl@users.noreply.github.com> Date: Thu, 25 May 2017 08:19:22 +0000 Subject: [PATCH] add error_handling conf for php 7 --- data/config/production/config.misc.php | 47 ++++++++++++++------------ 1 file changed, 25 insertions(+), 22 deletions(-) diff --git a/data/config/production/config.misc.php b/data/config/production/config.misc.php index ec3728f..eddbae0 100644 --- a/data/config/production/config.misc.php +++ b/data/config/production/config.misc.php @@ -1,4 +1,5 @@ =')) { - error_reporting (E_ALL ^E_NOTICE ^E_DEPRECATED ^E_USER_DEPRECATED ^E_STRICT); - } else { - error_reporting (E_ALL ^E_NOTICE ^E_DEPRECATED ^E_USER_DEPRECATED); - } + if (version_compare(PHP_VERSION, '5.3.0', '<')) { // remove unknown deprecated for PHP < 5.3 + error_reporting(E_ALL ^ E_NOTICE); + } else + 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 { + error_reporting(E_ALL ^ E_NOTICE ^ E_DEPRECATED ^ E_USER_DEPRECATED); + } } } @@ -216,7 +219,7 @@ $cfg['cache']['disable'] = true; // (string) Directory, where to store cache files. // NOTE: This setting doesn't affects frontend caching -$cfg['cache']['dir'] = 'cache/'; +$cfg['cache']['dir'] = 'cache/'; // (int) Lifetime of cached files in seconds. // NOTE: This setting doesn't affects frontend caching @@ -282,7 +285,7 @@ $cfg["contenido"]["notifyinterval"] = 20; // Check out Contenido_UrlBuilderFactory::getUrlBuilder() in // contenido/classes/UrlBuilder/Contenido_UrlBuilderFactory.class.php for more details // about this setting. -$cfg['url_builder']['name'] = 'front_content'; +$cfg['url_builder']['name'] = 'front_content'; // (array) Default UrlBuilder configuration. // An associative configuration array which will be passed to the UrlBuilder instance.