From d40d94ca5f304d8a084accd3162163026617a606 Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Mon, 6 Oct 2014 03:19:17 +0300 Subject: E_DEPRECATED is not available in PHP 5.2 --- index.php | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'index.php') diff --git a/index.php b/index.php index 80082111e..236c740c6 100755 --- a/index.php +++ b/index.php @@ -61,8 +61,15 @@ switch (ENVIRONMENT) case 'testing': case 'production': - error_reporting(E_ALL & ~E_NOTICE & ~E_DEPRECATED & ~E_STRICT); ini_set('display_errors', 0); + if (version_compare(PHP_VERSION, '5.3', '>=')) + { + error_reporting(E_ALL & ~E_NOTICE & ~E_DEPRECATED & ~E_STRICT & ~E_USER_NOTICE & ~E_USER_DEPRECATED); + } + else + { + error_reporting(E_ALL & ~E_NOTICE & ~E_STRICT & ~E_USER_NOTICE); + } break; default: -- cgit v1.2.3-24-g4f1b