PDA

View Full Version : Undefined Variable: $reg


blackfeather
04-29-2004, 10:59 AM
I think I found a typo in version 1.8.0:

When doing searches with keywords as short as SMALL_WORDS_SIZE or shorter, I would get this message from PHP for each keyword entered:

Notice: Undefined variable: reg in ..\libs\search_function.php on line 150

I notice that this array, '$reg' only exists in the code in 4 or 5 places, and never gets assigned any value. Is this a typo? should this be '$regs' instead of '$reg'? It also exists in robot_functions.php around line 150.

After changing all occurances to '$regs', the above error dissappeared.

Charter
05-01-2004, 06:50 AM
Hi. Yes, the following line:

if (($regs[$n]) || ($reg[$n] == 0)) {

should be the following:

if (($regs[$n]) || ($regs[$n] == 0)) {

The "$reg" in the robot_functions.php file is fine.

blackfeather
05-01-2004, 12:02 PM
awsome... thanks!