|
From: <var...@us...> - 2021-10-11 12:55:32
|
Revision: 10624
http://sourceforge.net/p/phpwiki/code/10624
Author: vargenau
Date: 2021-10-11 12:55:31 +0000 (Mon, 11 Oct 2021)
Log Message:
-----------
Improve error_reporting()
Modified Paths:
--------------
trunk/lib/main.php
Modified: trunk/lib/main.php
===================================================================
--- trunk/lib/main.php 2021-10-11 10:18:58 UTC (rev 10623)
+++ trunk/lib/main.php 2021-10-11 12:55:31 UTC (rev 10624)
@@ -86,9 +86,6 @@
. $dbi->getParam('db_session_table'));
}
-// Fixme: Does pear reset the error mask to 1? We have to find the culprit
-//$x = error_reporting();
-
parent::__construct(); // [90ms]
// Normalize args...
@@ -1468,12 +1465,19 @@
$request->finish();
}
-if ((!(defined('FUSIONFORGE') && FUSIONFORGE)) || (forge_get_config('installation_environment') != 'production')) {
- if (defined('E_STRICT') and (E_ALL & E_STRICT)) // strict php5?
- error_reporting(E_ALL & ~E_STRICT); // exclude E_STRICT
- else
- error_reporting(E_ALL); // php4
-} else {
+if (defined('FUSIONFORGE') && FUSIONFORGE) {
+ if (forge_get_config('installation_environment') == 'production') {
+ // Do not display warnings
+ error_reporting(E_ERROR);
+ } else {
+ // Display warnings
+ error_reporting(E_ALL);
+ }
+} elseif (DEBUG) {
+ // Display warnings
+ error_reporting(E_ALL);
+} else {
+ // Do not display warnings
error_reporting(E_ERROR);
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|