Revision: 11149
http://sourceforge.net/p/phpwiki/code/11149
Author: carstenklapp
Date: 2025-02-19 20:53:14 +0000 (Wed, 19 Feb 2025)
Log Message:
-----------
Tweak DEBUG & Error reporting logic
Modified Paths:
--------------
trunk/lib/ErrorManager.php
Modified: trunk/lib/ErrorManager.php
===================================================================
--- trunk/lib/ErrorManager.php 2025-02-19 19:23:16 UTC (rev 11148)
+++ trunk/lib/ErrorManager.php 2025-02-19 20:53:14 UTC (rev 11149)
@@ -49,11 +49,10 @@
before all headers have been sent, resulting in a garbled page.
All code using assertions will have to be rewritten for php9.
*/
+Error_reporting(E_ALL ^ (/*E_NOTICE | E_WARNING |*/ E_DEPRECATED));
if (defined('DEBUG') and DEBUG) {
- Error_reporting(E_ALL);
assert_options(ASSERT_ACTIVE, 1);
} else {
- Error_reporting(E_ALL ^ (/*E_NOTICE | E_WARNING |*/ E_DEPRECATED));
assert_options(ASSERT_ACTIVE, 0);
}
assert_options(ASSERT_CALLBACK, 'wiki_assert_handler');
@@ -62,6 +61,9 @@
{
ErrorManager_errorHandler($code, sprintf("<br />%s:%s: %s: Assertion failed <br />", $file, $line, $code), $file, $line);
}
+if (defined('DEBUG') and DEBUG) {
+ Error_reporting(E_ALL);
+}
/**
* A class which allows custom handling of PHP errors.
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|