DevHeads.net

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

Link: <a href="http://git.php.net/?p=web/bugs.git;a=commitdiff;h=b4891d7bef11454c4024c8beb577a15cde24e0ae" title="http://git.php.net/?p=web/bugs.git;a=commitdiff;h=b4891d7bef11454c4024c8beb577a15cde24e0ae">http://git.php.net/?p=web/bugs.git;a=commitdiff;h=b4891d7bef11454c4024c8...</a>

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);
+// 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'] = ' ... at php dot net';
}