Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PHP warning from search module (5.2.1) when there are no results #160

Closed
PaulBaileyAtChan opened this Issue Mar 13, 2019 · 0 comments

Comments

Projects
None yet
2 participants
@PaulBaileyAtChan
Copy link

PaulBaileyAtChan commented Mar 13, 2019

Description of the problem
When there are no search results, mod.search.php issues a warning:

array_unique() expects parameter 1 to be an array, null given
ee/EllisLab/Addons/search/mod.search.php, line 1147

It looks like this might be a side-effect of the result count fix in #141, with line 1147 failing to check for empty results before call to array_unique():

$this->num_rows = count(array_unique($query_parts['entries']));

Environment Details:

  • Version: 5.2.1
  • PHP Version: 7.0.33
  • MySQL Version: 5.0.12
  • OS: Ubuntu 16.04.2
  • Web Server: Apache 2.0

@robinsowell robinsowell self-assigned this Mar 13, 2019

@kevincupp kevincupp closed this in b58dc14 Mar 18, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.