From faca571a3afcd9d8c3e17b09cc0df0cd78c32b2f Mon Sep 17 00:00:00 2001 From: Ryan Boren Date: Thu, 4 Oct 2012 18:21:47 +0000 Subject: [PATCH] Avoid 'Only variables should be assigned by reference' warning. Props wonderboymusic. see #21865 git-svn-id: http://core.svn.wordpress.org/trunk@22114 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-includes/comment-template.php | 2 +- wp-includes/link-template.php | 2 +- wp-includes/post.php | 2 +- wp-includes/taxonomy.php | 4 ++-- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/wp-includes/comment-template.php b/wp-includes/comment-template.php index 00ce175367..dc7ad40015 100644 --- a/wp-includes/comment-template.php +++ b/wp-includes/comment-template.php @@ -894,7 +894,7 @@ function comments_template( $file = '/comments.php', $separate_comments = false update_comment_cache($wp_query->comments); if ( $separate_comments ) { - $wp_query->comments_by_type = &separate_comments($comments); + $wp_query->comments_by_type = separate_comments($comments); $comments_by_type = &$wp_query->comments_by_type; } diff --git a/wp-includes/link-template.php b/wp-includes/link-template.php index 43468ea067..5bfb1b164e 100644 --- a/wp-includes/link-template.php +++ b/wp-includes/link-template.php @@ -978,7 +978,7 @@ function get_delete_post_link( $id = 0, $deprecated = '', $force_delete = false * @return string */ function get_edit_comment_link( $comment_id = 0 ) { - $comment = &get_comment( $comment_id ); + $comment = get_comment( $comment_id ); if ( !current_user_can( 'edit_comment', $comment->comment_ID ) ) return; diff --git a/wp-includes/post.php b/wp-includes/post.php index 376132ea08..8f08b0d3d5 100644 --- a/wp-includes/post.php +++ b/wp-includes/post.php @@ -3653,7 +3653,7 @@ function get_pages($args = '') { update_post_cache( $pages ); if ( $child_of || $hierarchical ) - $pages = & get_page_children($child_of, $pages); + $pages = get_page_children($child_of, $pages); if ( !empty($exclude_tree) ) { $exclude = (int) $exclude_tree; diff --git a/wp-includes/taxonomy.php b/wp-includes/taxonomy.php index a37e700a92..54175e007c 100644 --- a/wp-includes/taxonomy.php +++ b/wp-includes/taxonomy.php @@ -2988,9 +2988,9 @@ function get_term_link( $term, $taxonomy = '') { if ( !is_object($term) ) { if ( is_int($term) ) { - $term = &get_term($term, $taxonomy); + $term = get_term($term, $taxonomy); } else { - $term = &get_term_by('slug', $term, $taxonomy); + $term = get_term_by('slug', $term, $taxonomy); } }