Make WordPress Core

Changeset 9515


Ignore:
Timestamp:
11/04/2008 08:16:54 PM (17 years ago)
Author:
ryan
Message:

Notice fixes from Viper007Bond. see #7509

Location:
trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-comments-post.php

    r9508 r9515  
    3333}
    3434
    35 $comment_author       = trim(strip_tags($_POST['author']));
    36 $comment_author_email = trim($_POST['email']);
    37 $comment_author_url   = trim($_POST['url']);
    38 $comment_content      = trim($_POST['comment']);
     35$comment_author       = ( isset($_POST['author']) )  ? trim(strip_tags($_POST['author'])) : null;
     36$comment_author_email = ( isset($_POST['email']) )   ? trim($_POST['email']) : null;
     37$comment_author_url   = ( isset($_POST['url']) )     ? trim($_POST['url']) : null;
     38$comment_content      = ( isset($_POST['comment']) ) ? trim($_POST['comment']) : null;
    3939
    4040// If the user is logged in
  • trunk/wp-includes/classes.php

    r9485 r9515  
    10831083        $id = $e->$id_field;
    10841084
    1085         foreach ( (array)$children_elements[$id] as $child )
    1086             $this->unset_children( $child, $children_elements );
     1085        if ( !empty($children_elements[$id]) && is_array($children_elements[$id]) )
     1086            foreach ( (array) $children_elements[$id] as $child )
     1087                $this->unset_children( $child, $children_elements );
    10871088
    10881089        if ( isset($children_elements[$id]) )
Note: See TracChangeset for help on using the changeset viewer.