aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorOliver Schramm <oliver.schramm97@gmail.com>2014-04-20 18:36:35 +0200
committerOliver Schramm <oliver.schramm97@gmail.com>2014-04-20 18:36:39 +0200
commit1905a2a7b24a7c9fa3fe5431695922ad387d0d17 (patch)
treec642c7bb05706daad46ceb8892b04752564ccf6b
parentc31ea7af66d3c38072de2fe6788c8d5d4c5d93f5 (diff)
downloadforums-1905a2a7b24a7c9fa3fe5431695922ad387d0d17.tar
forums-1905a2a7b24a7c9fa3fe5431695922ad387d0d17.tar.gz
forums-1905a2a7b24a7c9fa3fe5431695922ad387d0d17.tar.bz2
forums-1905a2a7b24a7c9fa3fe5431695922ad387d0d17.tar.xz
forums-1905a2a7b24a7c9fa3fe5431695922ad387d0d17.zip
[ticket/12422] Fix debug warning in log search
PHPBB3-12422
-rw-r--r--phpBB/phpbb/log/log.php18
1 files changed, 16 insertions, 2 deletions
diff --git a/phpBB/phpbb/log/log.php b/phpBB/phpbb/log/log.php
index 44fba06d9d..e38950f4c1 100644
--- a/phpBB/phpbb/log/log.php
+++ b/phpBB/phpbb/log/log.php
@@ -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;
+ }
}
}