diff options
| author | Joas Schilling <nickvergessen@gmx.de> | 2014-04-22 19:42:20 +0200 |
|---|---|---|
| committer | Joas Schilling <nickvergessen@gmx.de> | 2014-04-22 19:42:20 +0200 |
| commit | 36ef90528bf819780797d18b72b3108aae3ca543 (patch) | |
| tree | ce31d0a70721ddb11c878bfa0486eab45e805509 /phpBB | |
| parent | 631182524aafa1870256160aa7a6051a1a2125bf (diff) | |
| parent | bf3425b0f84f9880ee7e92c1658bbc5412eaccaa (diff) | |
| download | forums-36ef90528bf819780797d18b72b3108aae3ca543.tar forums-36ef90528bf819780797d18b72b3108aae3ca543.tar.gz forums-36ef90528bf819780797d18b72b3108aae3ca543.tar.bz2 forums-36ef90528bf819780797d18b72b3108aae3ca543.tar.xz forums-36ef90528bf819780797d18b72b3108aae3ca543.zip | |
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
Diffstat (limited to 'phpBB')
| -rw-r--r-- | phpBB/phpbb/log/log.php | 18 |
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; + } } } |
