Make WordPress Core

Changeset 24866


Ignore:
Timestamp:
07/29/2013 05:53:24 PM (12 years ago)
Author:
nacin
Message:

Fix pass by reference issue. see #24873.

File:
1 edited

Legend:

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

    r24864 r24866  
    181181    if ( ! $compare_two_mode ) {
    182182        $found = array_search( $selected_revision_id, array_keys( $revisions ) );
    183         if ( $found )
    184             $from = array_shift( array_keys( array_slice( $revisions, $found - 1, 1, true ) ) );
    185         else
     183        if ( $found ) {
     184            $from = array_keys( array_slice( $revisions, $found - 1, 1, true ) );
     185            $from = reset( $from );
     186        } else {
    186187            $from = 0;
     188        }
    187189    }
    188190
Note: See TracChangeset for help on using the changeset viewer.