Skip to content

Commit 4a4eba3

Browse files
authored
Merge pull request dokuwiki#4548 from annda/search-warning
Eliminate warnings in OR search
2 parents bc6b175 + 882e464 commit 4a4eba3

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

inc/fulltext.php

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -651,7 +651,11 @@ function ft_resultUnite($args)
651651
$result = $args[0];
652652
for ($i = 1; $i !== $array_count; $i++) {
653653
foreach (array_keys($args[$i]) as $id) {
654-
$result[$id] += $args[$i][$id];
654+
if (isset($result[$id])) {
655+
$result[$id] += $args[$i][$id];
656+
} else {
657+
$result[$id] = $args[$i][$id];
658+
}
655659
}
656660
}
657661
return $result;

0 commit comments

Comments
 (0)