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:
@@ -19,3 +19,6 @@ core:
|
||||
extensions:
|
||||
composer_debug: true
|
||||
composer_verbose: true
|
||||
|
||||
session:
|
||||
log_errors: true
|
||||
|
@@ -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;
|
||||
|
@@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
@@ -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)
|
||||
{
|
||||
|
@@ -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);
|
||||
}
|
||||
|
||||
/**
|
||||
|
Reference in New Issue
Block a user