From 9d85e6b9d01e79c32ded3667b5fd7ac49b6ca2bd Mon Sep 17 00:00:00 2001 From: Ryan Boren Date: Thu, 4 Oct 2012 18:37:43 +0000 Subject: [PATCH] Avoid 'Only variables should be assigned by reference' warning. Props wonderboymusic. see #21865 git-svn-id: https://develop.svn.wordpress.org/trunk@22117 602fd350-edb4-49c9-b593-d223f7449a82 --- wp-admin/includes/ajax-actions.php | 2 +- wp-includes/category-template.php | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/wp-admin/includes/ajax-actions.php b/wp-admin/includes/ajax-actions.php index 665ee78ab2..c27f6dfb58 100644 --- a/wp-admin/includes/ajax-actions.php +++ b/wp-admin/includes/ajax-actions.php @@ -326,7 +326,7 @@ function _wp_ajax_add_hierarchical_term() { $term_id = $parent->term_id; while ( $parent->parent ) { // get the top parent - $parent = &get_term( $parent->parent, $taxonomy->name ); + $parent = get_term( $parent->parent, $taxonomy->name ); if ( is_wp_error( $parent ) ) break; $term_id = $parent->term_id; diff --git a/wp-includes/category-template.php b/wp-includes/category-template.php index ce29c90c47..ceff339e49 100644 --- a/wp-includes/category-template.php +++ b/wp-includes/category-template.php @@ -41,7 +41,7 @@ function get_category_link( $category ) { */ function get_category_parents( $id, $link = false, $separator = '/', $nicename = false, $visited = array() ) { $chain = ''; - $parent = &get_category( $id ); + $parent = get_category( $id ); if ( is_wp_error( $parent ) ) return $parent; @@ -135,7 +135,7 @@ function _usort_terms_by_ID( $a, $b ) { */ function get_the_category_by_ID( $cat_ID ) { $cat_ID = (int) $cat_ID; - $category = &get_category( $cat_ID ); + $category = get_category( $cat_ID ); if ( is_wp_error( $category ) ) return $category; return $category->name;