1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-04-14 04:42:04 +02:00

[ticket/12636] Add log.session_errors

PHPBB3-12636
This commit is contained in:
Rubén Calvo 2018-09-01 01:16:57 +02:00 committed by Marc Alexander
parent 4f402465bf
commit 303b823847
No known key found for this signature in database
GPG Key ID: 50E0D2423696F995
4 changed files with 16 additions and 1 deletions

View File

@ -15,3 +15,6 @@ core:
debug: true
auto_reload: true
enable_debug_extension: true
log:
session_errors: true

View File

@ -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;

View File

@ -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);
}
}
/**

View File

@ -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)
{