Make WordPress Core


Ignore:
Timestamp:
01/29/2014 06:45:54 AM (13 years ago)
Author:
wonderboymusic
Message:

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.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/revision.php

    r26995 r27057  
    257257 */
    258258function wp_get_post_revision(&$post, $output = OBJECT, $filter = 'raw') {
    259         $null = null;
    260259        if ( !$revision = get_post( $post, OBJECT, $filter ) )
    261260                return $revision;
    262261        if ( 'revision' !== $revision->post_type )
    263                 return $null;
     262                return null;
    264263
    265264        if ( $output == OBJECT ) {
Note: See TracChangeset for help on using the changeset viewer.