mirror of
https://github.com/phpbb/phpbb.git
synced 2025-07-20 00:21:42 +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:
|
extensions:
|
||||||
composer_debug: true
|
composer_debug: true
|
||||||
composer_verbose: true
|
composer_verbose: true
|
||||||
|
|
||||||
|
session:
|
||||||
|
log_errors: true
|
||||||
|
@@ -56,6 +56,12 @@ class container_configuration implements ConfigurationInterface
|
|||||||
->booleanNode('composer_verbose')->defaultValue(false)->end()
|
->booleanNode('composer_verbose')->defaultValue(false)->end()
|
||||||
->end()
|
->end()
|
||||||
->end()
|
->end()
|
||||||
|
->arrayNode('session')
|
||||||
|
->addDefaultsIfNotSet()
|
||||||
|
->children()
|
||||||
|
->booleanNode('log_errors')->defaultValue(false)->end()
|
||||||
|
->end()
|
||||||
|
->end()
|
||||||
->end()
|
->end()
|
||||||
;
|
;
|
||||||
return $treeBuilder;
|
return $treeBuilder;
|
||||||
|
@@ -112,6 +112,12 @@ class core extends Extension
|
|||||||
{
|
{
|
||||||
$container->setParameter('debug.' . $name, $value);
|
$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
|
else
|
||||||
{
|
{
|
||||||
// Added logging temporarily to help debug bugs...
|
// 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)
|
if ($referer_valid)
|
||||||
{
|
{
|
||||||
|
@@ -21,6 +21,7 @@ class phpbb_mock_container_builder implements ContainerInterface
|
|||||||
public function __construct()
|
public function __construct()
|
||||||
{
|
{
|
||||||
$this->setParameter('debug.load_time', false);
|
$this->setParameter('debug.load_time', false);
|
||||||
|
$this->setParameter('session.log_errors', false);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Reference in New Issue
Block a user