mirror of
https://github.com/WordPress/WordPress.git
synced 2025-01-10 18:37:58 +01:00
Fix pass by reference issue. see #24873.
git-svn-id: http://core.svn.wordpress.org/trunk@24866 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
b53325cad3
commit
e0c4fc0032
@ -180,10 +180,12 @@ function wp_prepare_revisions_for_js( $post, $selected_revision_id, $from = null
|
||||
$compare_two_mode = is_numeric( $from );
|
||||
if ( ! $compare_two_mode ) {
|
||||
$found = array_search( $selected_revision_id, array_keys( $revisions ) );
|
||||
if ( $found )
|
||||
$from = array_shift( array_keys( array_slice( $revisions, $found - 1, 1, true ) ) );
|
||||
else
|
||||
if ( $found ) {
|
||||
$from = array_keys( array_slice( $revisions, $found - 1, 1, true ) );
|
||||
$from = reset( $from );
|
||||
} else {
|
||||
$from = 0;
|
||||
}
|
||||
}
|
||||
|
||||
$from = absint( $from );
|
||||
|
Loading…
Reference in New Issue
Block a user