mirror of
https://github.com/phpbb/phpbb.git
synced 2025-08-01 14:30:32 +02:00
Merge pull request #2335 from Elsensee/ticket/12422
[ticket/12422] Fix debug warning in log search * Elsensee/ticket/12422: [ticket/12422] Add tests [ticket/12422] Fix debug warning in log search
This commit is contained in:
@@ -643,9 +643,23 @@ class log implements \phpbb\log\log_interface
|
||||
$operations = array();
|
||||
foreach ($this->user->lang as $key => $value)
|
||||
{
|
||||
if (substr($key, 0, 4) == 'LOG_' && preg_match($keywords_pattern, $value))
|
||||
if (substr($key, 0, 4) == 'LOG_')
|
||||
{
|
||||
$operations[] = $key;
|
||||
if (is_array($value))
|
||||
{
|
||||
foreach ($value as $plural_value)
|
||||
{
|
||||
if (preg_match($keywords_pattern, $plural_value))
|
||||
{
|
||||
$operations[] = $key;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
else if (preg_match($keywords_pattern, $value))
|
||||
{
|
||||
$operations[] = $key;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user