From 27523183bf716d21c47cfbf042a911c93f918f7a Mon Sep 17 00:00:00 2001 From: Scott Taylor Date: Wed, 11 Jun 2014 21:05:16 +0000 Subject: [PATCH] Don't use variable variables in `touch_time()`. See #27881. Built from https://develop.svn.wordpress.org/trunk@28747 git-svn-id: http://core.svn.wordpress.org/trunk@28561 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-admin/includes/template.php | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/wp-admin/includes/template.php b/wp-admin/includes/template.php index 9bf5b291a9..95a3bf950d 100644 --- a/wp-admin/includes/template.php +++ b/wp-admin/includes/template.php @@ -756,10 +756,19 @@ function touch_time( $edit = 1, $for_post = 1, $tab_index = 0, $multi = 0 ) { if ( $multi ) return; echo "\n\n"; - foreach ( array('mm', 'jj', 'aa', 'hh', 'mn') as $timeunit ) { - echo '' . "\n"; + $map = array( + 'mm' => array( $mm, $cur_mm ), + 'jj' => array( $jj, $cur_jj ), + 'aa' => array( $aa, $cur_aa ), + 'hh' => array( $hh, $cur_hh ), + 'mn' => array( $mn, $cur_mn ), + ); + foreach ( $map as $timeunit => $value ) { + list( $unit, $curr ) = $value; + + echo '' . "\n"; $cur_timeunit = 'cur_' . $timeunit; - echo '' . "\n"; + echo '' . "\n"; } ?>