From 7cf1702442a6a2de3e0960289634204bf7ebadaf Mon Sep 17 00:00:00 2001 From: Mark Jaquith Date: Fri, 12 Jul 2013 07:26:11 +0000 Subject: [PATCH] Fix a PHP 5.4-ism that slipped in. git-svn-id: http://core.svn.wordpress.org/trunk@24670 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-admin/includes/revision.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/wp-admin/includes/revision.php b/wp-admin/includes/revision.php index 94800ec58c..0098c8c9d6 100644 --- a/wp-admin/includes/revision.php +++ b/wp-admin/includes/revision.php @@ -101,7 +101,8 @@ function wp_prepare_revisions_for_js( $post, $selected_revision_id, $from = null // Now, grab the initial diff $compare_two_mode = (bool) $from; if ( ! $from ) // Single mode - $from = array_keys( array_slice( $revisions, array_search( $selected_revision_id, array_keys( $revisions ) ) - 1, 1, true ) )[0]; + $from = array_keys( array_slice( $revisions, array_search( $selected_revision_id, array_keys( $revisions ) ) - 1, 1, true ) ); + $from = $from[0]; $diffs = array( array( 'id' => $from . ':' . $selected_revision_id,