Ravens PHP Scripts: Forums
 

 

View next topic
View previous topic
Post new topic   Reply to topic    Ravens PHP Scripts And Web Hosting Forum Index -> v2.4 RN Issues
Author Message
999
Regular
Regular



Joined: Sep 12, 2006
Posts: 58
Location: Dsm, IA

PostPosted: Tue Sep 15, 2009 2:58 pm Reply with quote

Just upgraded to 2.40, nice work, just one issue I have. I'm getting tons of error messages all saying
Code:
PHP Warning:  stristr() [<a href='function.stristr'>function.stristr</a>]: Empty delimiter in /home/xxx/public_html/includes/nukesentinel.php on line 370

the code there is
Code:
// Check for Referer

$blocker_row = @$blocker_array[6];
if($blocker_row['activate'] > 0) {
  if($ab_config['list_referer'] > "") {
    $RefererList = explode("\r\n", $ab_config['list_referer']);
    for ($i=0, $maxi=count($RefererList); $i < $maxi; $i++) {
      $refered = $RefererList[$i];
      if(stristr($nsnst_const['referer'], $refered) AND !empty($refered)) {
        block_ip($blocker_row, $refered);

The only difference there between the old and the new is the @ in front of "$blocker_array", and I wasn't getting the errors before. Confused
Wasn't sure if this should go here or the ns forums as it's just started after the upgrade.
 
View user's profile Send private message Visit poster's website MSN Messenger
Palbin
Site Admin



Joined: Mar 30, 2006
Posts: 2583
Location: Pittsburgh, Pennsylvania

PostPosted: Tue Sep 15, 2009 4:21 pm Reply with quote

It is because you have block referrers on, but no referrers in the list. Regardless this error should not be appearing Sad.

Find this line:
Code:
 

if(stristr($nsnst_const['referer'], $refered) AND !empty($refered)) {

Change to this:
Code:
 

if(!empty($refered) AND stristr($nsnst_const['referer'], $refered)) {

_________________
"Debugging is twice as hard as writing the code in the first place. Therefore, if you write the code as cleverly as possible, you are, by definition, not smart enough to debug it." — Brian W. Kernighan. 
View user's profile Send private message
999







PostPosted: Tue Sep 15, 2009 4:39 pm Reply with quote

Weird, I have 8 pages of blocked referrers. That did however stop the error, thanks. Very Happy
 
Palbin







PostPosted: Tue Sep 15, 2009 5:03 pm Reply with quote

Hmm. I'll look at it again, but I'm not sure how it would be blank if you have 8 pages.
 
Display posts from previous:       
Post new topic   Reply to topic    Ravens PHP Scripts And Web Hosting Forum Index -> v2.4 RN Issues

View next topic
View previous topic
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You can attach files in this forum
You can download files in this forum


Powered by phpBB © 2001-2007 phpBB Group
All times are GMT - 6 Hours
 
Forums ©