Use explicit variable variable syntax

PHP7 introduces a backwards compatable change to variable varibale syntax that requires us to use curly brackets to maintain the syntax between php5 and php7.  For more info, see https://wiki.php.net/rfc/uniform_variable_syntax#semantic_differences_in_existing_syntax for the semantic differences.  

Props ocean90
Fixes #31982



git-svn-id: https://develop.svn.wordpress.org/trunk@33427 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Aaron Jorbin 2015-07-26 18:03:58 +00:00
parent 079d7eb56e
commit 385b98d828
2 changed files with 2 additions and 2 deletions

View File

@ -1103,7 +1103,7 @@ class WP_Customize_Nav_Menu_Item_Setting extends WP_Customize_Setting {
$i = 1; $i = 1;
foreach ( $items as $k => $item ) { foreach ( $items as $k => $item ) {
$items[ $k ]->$args['output_key'] = $i++; $items[ $k ]->{$args['output_key']} = $i++;
} }
} }

View File

@ -638,7 +638,7 @@ function wp_get_nav_menu_items( $menu, $args = array() ) {
usort($items, '_sort_nav_menu_items'); usort($items, '_sort_nav_menu_items');
$i = 1; $i = 1;
foreach( $items as $k => $item ) { foreach( $items as $k => $item ) {
$items[$k]->$args['output_key'] = $i++; $items[$k]->{$args['output_key']} = $i++;
} }
} }