WordPress.org

Make WordPress Core


Ignore:
Timestamp:
08/06/2008 08:31:54 PM (13 years ago)
Author:
markjaquith
Message:

Cast to array when using foreach(). Props santosj (and thanks for your perseverance!). fixes #2784

File:
1 edited

Legend:

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

    r8543 r8572  
    5353        $words = explode("\n", $mod_keys );
    5454
    55         foreach ($words as $word) {
     55        foreach ( (array) $words as $word) {
    5656            $word = trim($word);
    5757
     
    12361236    // We don't wanna ping first and second types, even if they have a valid <link/>
    12371237
    1238     foreach ( $post_links_temp[0] as $link_test ) :
     1238    foreach ( (array) $post_links_temp[0] as $link_test ) :
    12391239        if ( !in_array($link_test, $pung) && (url_to_postid($link_test) != $post_ID) // If we haven't pung it already and it isn't a link to itself
    12401240                && !is_local_attachment($link_test) ) : // Also, let's never ping local attachments.
Note: See TracChangeset for help on using the changeset viewer.