PhpDig.net

Go Back   PhpDig.net > PhpDig Forums > Bug Tracker

Reply
 
Thread Tools
Old 04-29-2004, 10:59 AM   #1
blackfeather
Green Mole
 
blackfeather's Avatar
 
Join Date: Apr 2004
Location: is
Posts: 3
Exclamation 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.
blackfeather is offline   Reply With Quote
Old 05-01-2004, 06:50 AM   #2
Charter
Head Mole
 
Charter's Avatar
 
Join Date: May 2003
Posts: 2,539
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.
__________________
Responses are offered on a voluntary if/as time is available basis, no guarantees. Double posting or bumping threads will not get your question answered any faster. No support via PM or email, responses not guaranteed. Thank you for your comprehension.
Charter is offline   Reply With Quote
Old 05-01-2004, 12:02 PM   #3
blackfeather
Green Mole
 
blackfeather's Avatar
 
Join Date: Apr 2004
Location: is
Posts: 3
awsome... thanks!
blackfeather is offline   Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
How to use variable in src tag ravi Coding & Tutorials 1 06-15-2006 07:58 AM
Undefined variable: user_agent noel Bug Tracker 6 10-30-2005 05:32 PM
Exclue url variable djavet How-to Forum 1 03-15-2005 10:04 PM
Variable with the URL in it (in spider.php) link92 How-to Forum 1 08-19-2004 02:14 PM
Not recognising get variable pages BCVisin Troubleshooting 7 04-15-2004 11:42 PM


All times are GMT -8. The time now is 05:03 AM.


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