aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--phpBB/config/development/config.yml3
-rw-r--r--phpBB/phpbb/di/extension/container_configuration.php6
-rw-r--r--phpBB/phpbb/di/extension/core.php6
-rw-r--r--phpBB/phpbb/session.php2
4 files changed, 16 insertions, 1 deletions
diff --git a/phpBB/config/development/config.yml b/phpBB/config/development/config.yml
index 0a052d8831..8db83320e7 100644
--- a/phpBB/config/development/config.yml
+++ b/phpBB/config/development/config.yml
@@ -15,3 +15,6 @@ core:
debug: true
auto_reload: true
enable_debug_extension: true
+
+ log:
+ session_errors: true
diff --git a/phpBB/phpbb/di/extension/container_configuration.php b/phpBB/phpbb/di/extension/container_configuration.php
index c64f47c716..25e0f8a193 100644
--- a/phpBB/phpbb/di/extension/container_configuration.php
+++ b/phpBB/phpbb/di/extension/container_configuration.php
@@ -49,6 +49,12 @@ class container_configuration implements ConfigurationInterface
->booleanNode('enable_debug_extension')->defaultValue(false)->end()
->end()
->end()
+ ->arrayNode('log')
+ ->addDefaultsIfNotSet()
+ ->children()
+ ->booleanNode('session_errors')->defaultValue(false)->end()
+ ->end()
+ ->end()
->end()
;
return $treeBuilder;
diff --git a/phpBB/phpbb/di/extension/core.php b/phpBB/phpbb/di/extension/core.php
index 7b5a286b40..213e3a5890 100644
--- a/phpBB/phpbb/di/extension/core.php
+++ b/phpBB/phpbb/di/extension/core.php
@@ -99,6 +99,12 @@ class core extends Extension
{
$container->setParameter('debug.' . $name, $value);
}
+
+ // Set the log options
+ foreach ($config['log'] as $name => $value)
+ {
+ $container->setParameter('log.' . $name, $value);
+ }
}
/**
diff --git a/phpBB/phpbb/session.php b/phpBB/phpbb/session.php
index e5621a4ee7..719a5fb104 100644
--- a/phpBB/phpbb/session.php
+++ b/phpBB/phpbb/session.php
@@ -479,7 +479,7 @@ class session
else
{
// Added logging temporarily to help debug bugs...
- if (defined('DEBUG') && $this->data['user_id'] != ANONYMOUS)
+ if ($phpbb_container->getParameter('log.session_errors') && $this->data['user_id'] != ANONYMOUS)
{
if ($referer_valid)
{