Ignore:
Timestamp:
Oct 16, 2012, 10:53:09 AM (12 years ago)
Author:
mistic100
Message:

handle empty file case, check COA and GuestBook

File:
1 edited

Legend:

Unmodified
Added
Removed
  • extensions/comments_blacklist/include/functions.inc.php

    r18394 r18651  
    1111  }
    1212 
    13   $blacklist = file(COMM_BLACKLIST_FILE, FILE_IGNORE_NEW_LINES | FILE_SKIP_EMPTY_LINES);
     13  $blacklist = @file(COMM_BLACKLIST_FILE, FILE_IGNORE_NEW_LINES | FILE_SKIP_EMPTY_LINES);
     14 
     15  if (empty($blacklist))
     16  {
     17    return $comment_action;
     18  }
     19 
    1420  $blacklist = array_map(create_function('$w', 'return " ".preg_quote($w)." ";'), $blacklist);
    1521  $blacklist = implode('|', $blacklist);
Note: See TracChangeset for help on using the changeset viewer.