PhpDig.net

PhpDig.net (http://www.phpdig.net/forum/index.php)
-   Bug Tracker (http://www.phpdig.net/forum/forumdisplay.php?f=27)
-   -   Undefined Variable: $reg (http://www.phpdig.net/forum/showthread.php?t=888)

blackfeather 04-29-2004 09:59 AM

Undefined Variable: $reg
 
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 05:50 AM

Hi. Yes, the following line:
PHP Code:

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

should be the following:
PHP Code:

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

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

blackfeather 05-01-2004 11:02 AM

awsome... thanks!


All times are GMT -8. The time now is 12:36 PM.

Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright © 2001 - 2005, ThinkDing LLC. All Rights Reserved.