1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-07-19 08:01:27 +02:00

Merge pull request #5331 from rubencm/ticket/12636

[ticket/12636] Add session.log_errors
This commit is contained in:
Marc Alexander
2018-10-10 22:40:21 +02:00
committed by GitHub
5 changed files with 17 additions and 1 deletions

View File

@@ -19,3 +19,6 @@ core:
extensions:
composer_debug: true
composer_verbose: true
session:
log_errors: true

View File

@@ -56,6 +56,12 @@ class container_configuration implements ConfigurationInterface
->booleanNode('composer_verbose')->defaultValue(false)->end()
->end()
->end()
->arrayNode('session')
->addDefaultsIfNotSet()
->children()
->booleanNode('log_errors')->defaultValue(false)->end()
->end()
->end()
->end()
;
return $treeBuilder;

View File

@@ -112,6 +112,12 @@ class core extends Extension
{
$container->setParameter('debug.' . $name, $value);
}
// Set the log options
foreach ($config['session'] as $name => $value)
{
$container->setParameter('session.' . $name, $value);
}
}
/**

View File

@@ -481,7 +481,7 @@ class session
else
{
// Added logging temporarily to help debug bugs...
if (defined('DEBUG') && $this->data['user_id'] != ANONYMOUS)
if ($phpbb_container->getParameter('session.log_errors') && $this->data['user_id'] != ANONYMOUS)
{
if ($referer_valid)
{

View File

@@ -21,6 +21,7 @@ class phpbb_mock_container_builder implements ContainerInterface
public function __construct()
{
$this->setParameter('debug.load_time', false);
$this->setParameter('session.log_errors', false);
}
/**