mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-04-04 20:54:29 +00:00
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:
@@ -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');
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user