aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB
diff options
context:
space:
mode:
authorJoas Schilling <nickvergessen@gmx.de>2015-01-09 18:39:11 +0100
committerJoas Schilling <nickvergessen@gmx.de>2015-01-09 18:39:11 +0100
commitd9bdd05c8065eecc99c55b827a8af575fcb08f1b (patch)
treee2ca1fe517d6ba1f98ca6149fe63eca97cfecb29 /phpBB
parent3350df131fec7a2a558ec0d1c0ef714fbfa4fa35 (diff)
parent8a9c2c055c7fbc199bad3e6fbfb0235a910b87e2 (diff)
downloadforums-d9bdd05c8065eecc99c55b827a8af575fcb08f1b.tar
forums-d9bdd05c8065eecc99c55b827a8af575fcb08f1b.tar.gz
forums-d9bdd05c8065eecc99c55b827a8af575fcb08f1b.tar.bz2
forums-d9bdd05c8065eecc99c55b827a8af575fcb08f1b.tar.xz
forums-d9bdd05c8065eecc99c55b827a8af575fcb08f1b.zip
Merge pull request #3128 from omniError/ticket/13306
[ticket/13306] add error level to collector
Diffstat (limited to 'phpBB')
-rw-r--r--phpBB/phpbb/error_collector.php17
1 files changed, 15 insertions, 2 deletions
diff --git a/phpBB/phpbb/error_collector.php b/phpBB/phpbb/error_collector.php
index 7141f83174..bf8efd1065 100644
--- a/phpBB/phpbb/error_collector.php
+++ b/phpBB/phpbb/error_collector.php
@@ -16,15 +16,28 @@ namespace phpbb;
class error_collector
{
var $errors;
+ var $error_types;
- function __construct()
+ /**
+ * Constructor.
+ *
+ * The variable $error_types may be set to a mask of PHP error types that
+ * the collector should keep, e.g. `E_ALL`. If unset, the current value of
+ * the error_reporting() function will be used to determine which errors
+ * the collector will keep.
+ *
+ * @see PHPBB3-13306
+ * @param int|null $error_types
+ */
+ function __construct($error_types = null)
{
$this->errors = array();
+ $this->error_types = $error_types;
}
function install()
{
- set_error_handler(array(&$this, 'error_handler'));
+ set_error_handler(array(&$this, 'error_handler'), ($this->error_types !== null) ? $this->error_types : error_reporting());
}
function uninstall()