Home › Forums › Product Support Forums › Ajax Search Pro for WordPress Support › Debug.log error – undefined index/offset › Reply To: Debug.log error – undefined index/offset
November 4, 2018 at 2:15 pm
#19741
Keymaster
Hi!
Make sure to open the search options on the back-end and save them, so the data is consistent. If that does not help, then change line 52 (in the code you linked) from this:
[code]if ( count($terms) == 1 && $terms[-1][‘id’] == -1 ) {[/code]
to this:
[code]if ( count($terms) == 1 && isset($terms[-1], $terms[-1][‘id’]) && $terms[-1][‘id’] == -1 ) {[/code]
That will do the trick!
Thank you for letting us know, I will make sure to include this fix in the upcoming release.