Notice fixes from Viper007Bond. see #7509

git-svn-id: http://svn.automattic.com/wordpress/trunk@9515 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
ryan 2008-11-04 20:16:54 +00:00
parent cdb6f430da
commit fe4c1331fe
2 changed files with 7 additions and 6 deletions

View File

@ -32,10 +32,10 @@ if ( empty($status->comment_status) ) {
exit;
}
$comment_author = trim(strip_tags($_POST['author']));
$comment_author_email = trim($_POST['email']);
$comment_author_url = trim($_POST['url']);
$comment_content = trim($_POST['comment']);
$comment_author = ( isset($_POST['author']) ) ? trim(strip_tags($_POST['author'])) : null;
$comment_author_email = ( isset($_POST['email']) ) ? trim($_POST['email']) : null;
$comment_author_url = ( isset($_POST['url']) ) ? trim($_POST['url']) : null;
$comment_content = ( isset($_POST['comment']) ) ? trim($_POST['comment']) : null;
// If the user is logged in
$user = wp_get_current_user();

View File

@ -1082,8 +1082,9 @@ class Walker {
$id_field = $this->db_fields['id'];
$id = $e->$id_field;
foreach ( (array)$children_elements[$id] as $child )
$this->unset_children( $child, $children_elements );
if ( !empty($children_elements[$id]) && is_array($children_elements[$id]) )
foreach ( (array) $children_elements[$id] as $child )
$this->unset_children( $child, $children_elements );
if ( isset($children_elements[$id]) )
unset( $children_elements[$id] );