Make WordPress Core

Changeset 24867


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

Fix pass by reference issue. see #24873.

Merges [24865] to the 3.6 branch.

Location:
branches/3.6
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/3.6

  • branches/3.6/wp-admin/includes/revision.php

    r24865 r24867  
    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.