Skip to content
This repository has been archived by the owner on Jul 21, 2022. It is now read-only.

Commit

Permalink
Fix error handler
Browse files Browse the repository at this point in the history
  • Loading branch information
MartinKravec committed Oct 9, 2017
1 parent 47fa54a commit 3a433ec
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions public/index.php
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down

0 comments on commit 3a433ec

Please sign in to comment.