Make WordPress Core


Ignore:
Timestamp:
05/27/2004 01:53:27 PM (22 years ago)
Author:
emc3
Message:

Fixed check_comment() to ignore empty lines in moderation_keys.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-includes/functions.php

    r1365 r1366  
    13431343        $words = explode("\n", get_settings('moderation_keys') );
    13441344        foreach ($words as $word) {
    1345         $word = trim($word);
    1346         $pattern = "#$word#i";
     1345                $word = trim($word);
     1346
     1347                // Skip empty lines
     1348                if (empty($word)) { continue; }
     1349
     1350                $pattern = "#$word#i";
    13471351                if ( preg_match($pattern, $author) ) return false;
    13481352                if ( preg_match($pattern, $email) ) return false;
Note: See TracChangeset for help on using the changeset viewer.