diff --git a/wp-includes/comment.php b/wp-includes/comment.php index cd9c9e9b3e..16bd29ea1e 100644 --- a/wp-includes/comment.php +++ b/wp-includes/comment.php @@ -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'); } } diff --git a/wp-includes/revision.php b/wp-includes/revision.php index 82b95c31ec..12cc8e1c4f 100644 --- a/wp-includes/revision.php +++ b/wp-includes/revision.php @@ -256,11 +256,10 @@ function _wp_put_post_revision( $post = null, $autosave = false ) { * @return mixed Null if error or post object if success. */ function wp_get_post_revision(&$post, $output = OBJECT, $filter = 'raw') { - $null = null; if ( !$revision = get_post( $post, OBJECT, $filter ) ) return $revision; if ( 'revision' !== $revision->post_type ) - return $null; + return null; if ( $output == OBJECT ) { return $revision; diff --git a/wp-includes/taxonomy.php b/wp-includes/taxonomy.php index 95c3d3676e..f5e3f22969 100644 --- a/wp-includes/taxonomy.php +++ b/wp-includes/taxonomy.php @@ -935,7 +935,6 @@ class WP_Tax_Query { */ function get_term($term, $taxonomy, $output = OBJECT, $filter = 'raw') { global $wpdb; - $null = null; if ( empty($term) ) { $error = new WP_Error('invalid_term', __('Empty Term')); @@ -954,11 +953,11 @@ function get_term($term, $taxonomy, $output = OBJECT, $filter = 'raw') { if ( is_object($term) ) $term = $term->term_id; if ( !$term = (int) $term ) - return $null; + return null; if ( ! $_term = wp_cache_get($term, $taxonomy) ) { $_term = $wpdb->get_row( $wpdb->prepare( "SELECT t.*, tt.* FROM $wpdb->terms AS t INNER JOIN $wpdb->term_taxonomy AS tt ON t.term_id = tt.term_id WHERE tt.taxonomy = %s AND t.term_id = %d LIMIT 1", $taxonomy, $term) ); if ( ! $_term ) - return $null; + return null; wp_cache_add($term, $_term, $taxonomy); } }