mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-08 20:38:52 +00:00
Merge pull request #6473 from rxu/ticket/17115-master
[ticket/17115] Fix PHP warning for space+hyphen ending search query - master
This commit is contained in:
commit
0567655bf7
2 changed files with 2 additions and 1 deletions
|
@ -393,7 +393,7 @@ class fulltext_native extends base implements search_backend_interface
|
||||||
$word = substr($word, 1);
|
$word = substr($word, 1);
|
||||||
|
|
||||||
// a group of which at least one may not be in the resulting posts
|
// a group of which at least one may not be in the resulting posts
|
||||||
if ($word[0] == '(')
|
if (isset($word[0]) && $word[0] == '(')
|
||||||
{
|
{
|
||||||
$word = array_unique(explode('|', substr($word, 1, -1)));
|
$word = array_unique(explode('|', substr($word, 1, -1)));
|
||||||
$mode = 'must_exclude_one';
|
$mode = 'must_exclude_one';
|
||||||
|
|
|
@ -183,6 +183,7 @@ abstract class phpbb_functional_search_base extends phpbb_functional_test_case
|
||||||
}
|
}
|
||||||
|
|
||||||
$this->assert_search_not_found('loremipsumdedo');
|
$this->assert_search_not_found('loremipsumdedo');
|
||||||
|
$this->assert_search_not_found('loremipsumdedo+-'); // test search query ending with the space followed by hyphen
|
||||||
$this->assert_search_not_found('barsearch+-testing'); // test excluding keyword
|
$this->assert_search_not_found('barsearch+-testing'); // test excluding keyword
|
||||||
$this->assert_search_for_author_not_found('authornotexists');
|
$this->assert_search_for_author_not_found('authornotexists');
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue