get_comment(), wp_get_post_revision(), and get_term() all used to return by reference. Because of this, $null was set to null so the return value would be a variable where applicable. This has not been necessary since [21792], so the $nulls have been removed.

Props toszcze.
Fixes #24768.



git-svn-id: https://develop.svn.wordpress.org/trunk@27057 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Scott Taylor
2014-01-29 06:45:54 +00:00
parent 62b57d8899
commit 13c1dd0004
3 changed files with 4 additions and 7 deletions

View File

@@ -135,7 +135,6 @@ function get_approved_comments($post_id) {
*/
function get_comment(&$comment, $output = OBJECT) {
global $wpdb;
$null = null;
if ( empty($comment) ) {
if ( isset($GLOBALS['comment']) )
@@ -151,7 +150,7 @@ function get_comment(&$comment, $output = OBJECT) {
} elseif ( ! $_comment = wp_cache_get($comment, 'comment') ) {
$_comment = $wpdb->get_row($wpdb->prepare("SELECT * FROM $wpdb->comments WHERE comment_ID = %d LIMIT 1", $comment));
if ( ! $_comment )
return $null;
return null;
wp_cache_add($_comment->comment_ID, $_comment, 'comment');
}
}