1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-08-12 03:34:04 +02:00

Merge pull request #5812 from rxu/ticket/16288

[ticket/16288] PHP 8 compatibility
This commit is contained in:
Marc Alexander
2020-01-09 20:34:53 +01:00
21 changed files with 110 additions and 46 deletions

View File

@@ -405,7 +405,7 @@ class fulltext_native extends \phpbb\search\base
}
// a group of words of which at least one word should be in every resulting post
if ($word[0] == '(')
if (isset($word[0]) && $word[0] == '(')
{
$word = array_unique(explode('|', substr($word, 1, -1)));
}

View File

@@ -384,7 +384,9 @@ class context
if (is_array($key))
{
// Search array to get correct position
list($search_key, $search_value) = @each($key);
$search_key = key($key);
$search_value = current($key);
foreach ($block as $i => $val_ary)
{
if ($val_ary[$search_key] === $search_value)
@@ -481,7 +483,8 @@ class context
if (is_array($key))
{
// Search array to get correct position
list($search_key, $search_value) = @each($key);
$search_key = key($key);
$search_value = current($key);
$key = null;
foreach ($block as $i => $val_ary)