From 3a433ec523e8e8c8fd33186eb0654f525e514fa2 Mon Sep 17 00:00:00 2001 From: MartinKravec Date: Mon, 9 Oct 2017 16:20:04 +0200 Subject: [PATCH] Fix error handler --- public/index.php | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/public/index.php b/public/index.php index ee5572a20c..276c63bcff 100644 --- a/public/index.php +++ b/public/index.php @@ -83,13 +83,19 @@ require_once($cpkFunction); } -if (! (php_sapi_name() != 'cli' OR defined('STDIN') || (is_numeric($_SERVER['argc']) && $_SERVER['argc'] > 0))) { +if ( + ( + (!(php_sapi_name() != 'cli' || defined('STDIN'))) + || + (is_numeric($_SERVER['argc']) && $_SERVER['argc'] > 0) + ) + == false) { if (isset($_SERVER['VUFIND_ENV'])) { if ($_SERVER['VUFIND_ENV'] == 'production') { - error_reporting(E_ALL); // Report all PHP errors + error_reporting(E_ALL & ~E_NOTICE); // Report all PHP errors ini_set("display_errors", 0); } else if ($_SERVER['VUFIND_ENV'] == 'development') { // DEVELOPMENT - error_reporting(E_ALL); // Report all PHP errors + error_reporting(E_ALL & ~E_NOTICE); // Report all PHP errors ini_set('display_startup_errors', 1); ini_set("display_errors", 1); } else {