Closed (fixed)
Project:
Search API Autocomplete
Version:
7.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
8 Nov 2012 at 04:09 UTC
Updated:
17 Jan 2013 at 23:20 UTC
The full error:
Recoverable fatal error: Argument 1 passed to search_api_autocomplete_access() must be an instance of SearchApiAutocompleteSearch, boolean given, called in mysite.local/html/sites/all/modules/search_api_autocomplete/search_api_autocomplete.search_api_views.inc on line 21 and defined in search_api_autocomplete_access() (line 153 of mysite.local/html/sites/all/modules/search_api_autocomplete/search_api_autocomplete.module).
I met this error after i update the module, and I added a simple argument check before invoking the SearchApiAutocompleteSearch().
| Comment | File | Size | Author |
|---|---|---|---|
| search_api_autocomplete_access_argument_instance.patch | 673 bytes | kurtzhong |
Comments
Comment #1
derhasi commentedHad the same error. This patch fixed that and should be a easy one to commit (maybe without the empty line).
Comment #2
andypost+1 to rtbc and please commit this
Comment #3
mh86 commentedyep, same here. This was introduced by #1803010: Introduce per-search permissions.
And following code
should be enough. There is no need to explicitly check the type of the $search object, as search_api_autocomplete_search_load() returns FALSE if not autocomplete search is found.
Comment #4
drunken monkeyThanks for reporting and posting a patch!
I now committed a slightly different version – in fact, exactly the one from #3.
Sorry it took me so long to get back to you!