com web/bugs: Enable displaying errors for local development environments: include/prepend.php

From: Date: Wed, 05 Dec 2018 12:38:52 +0000
Subject: com web/bugs: Enable displaying errors for local development environments: include/prepend.php
Groups: php.webmaster 
Request: Send a blank email to php-webmaster+get-27492@lists.php.net to get a copy of this message
Commit: b4891d7bef11454c4024c8beb577a15cde24e0ae Author: Peter Kokot <peterkokot@gmail.com> Wed, 5 Dec 2018 13:38:52 +0100 Parents: a5c3a8b7fc6e94b0c4152e2f06a4969bb2af303f Branches: master Link: http://git.php.net/?p=web/bugs.git;a=commitdiff;h=b4891d7bef11454c4024c8beb577a15cde24e0ae Log: Enable displaying errors for local development environments Changed paths: M include/prepend.php Diff: diff --git a/include/prepend.php b/include/prepend.php index 8417607..5a84714 100644 --- a/include/prepend.php +++ b/include/prepend.php @@ -4,8 +4,6 @@ if (file_exists(__DIR__.'/../vendor/autoload.php')) { require_once __DIR__.'/../vendor/autoload.php'; } -ini_set('display_errors', 0); - $site = 'php'; $siteBig = 'PHP'; $ROOT_DIR = realpath(__DIR__ . '/../'); @@ -31,6 +29,13 @@ if (file_exists($local_cfg)) { } // CONFIG END +// Configure errors based on the environment. +if (defined(DEVBOX) && true === DEVBOX) { + ini_set('display_errors', 1); +} else { + ini_set('display_errors', 0); +} + if (!isset($site_data['security_email'])) { $site_data['security_email'] = 'security@php.net'; }

« previous php.webmaster (#27492) next »