News:

Wondering if this will always be free?  See why free is better.

Main Menu

2.1.4 - SearchAPI-Custom.php Error Log Messages

Started by cgeek, June 12, 2023, 08:02:14 PM

Previous topic - Next topic

cgeek

I don't know what's causing it, but I am getting a fair number of errors in the Error Log since the upgrade from 2.1.3 to 2.1.4.  It does not seem to be causing any issues that users are reporting and I can't find a way to reproduce it.

What I did notice is that the code seems to be referencing a variable named 'excludedWord' (as the error below suggests), but I don't see it being set in code.  I believe it is likely a global, but is not globalized in the function using it.  Perhaps adding it to the global line fixes it, but since I don't know how to reproduce the error I have no way of reliably testing.

Suggestions?  Can I provide more detail?

Error from the Log:
QuoteGuest
 ww.xx.yy.zz
 61d5c197fc8dcfdbfb452396c3c47afc
 https://www.yyz.com/index.php?
 /home/yyz/public_html/Sources/SearchAPI-Custom.php (Line 212)  Backtrace information

Type of error: Undefined
Error messageSelect
8: Undefined variable: excludedWord

Detail:
QuoteError
Type of error
Undefined_vars

Error message
8: Undefined variable: excludedWord
File /home/yyz/public_html/Sources/SearchAPI-Custom.php
Line 212

URL of page causing the error
https://www.yyz.com/index.php?

Backtrace information
#0: smf_error_handler()
Called from /home/yyz/public_html/Sources/SearchAPI-Custom.php on line 212

#1: indexedWordQuery()
Called from /home/yyz/public_html/Sources/Search.php on line 1608

#2: PlushSearch2()
Called from /home/yyz/public_html/index.php on line 184

shawnb61

Address the process rather than the outcome.  Then, the outcome becomes more likely.   - Fripp

cgeek

#2
I dug into this a bit more.

I think the issue is Lines 210 and 212 should be referencing $phrase rather than $excludedWord.

Hope that helps and let me know if I can provide more info.

shawnb61

Address the process rather than the outcome.  Then, the outcome becomes more likely.   - Fripp

Advertisement: