Commit:    b4891d7bef11454c4024c8beb577a15cde24e0ae
Author:    Peter Kokot <peterko...@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'] = 'secur...@php.net';
 }


--
PHP Webmaster List Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to