WordPress.org

Make WordPress Core


Ignore:
Timestamp:
07/26/2015 06:03:58 PM (5 years ago)
Author:
jorbin
Message:

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

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/nav-menu.php

    r33256 r33427  
    639639        $i = 1;
    640640        foreach( $items as $k => $item ) {
    641             $items[$k]->$args['output_key'] = $i++;
     641            $items[$k]->{$args['output_key']} = $i++;
    642642        }
    643643    }
Note: See TracChangeset for help on using the changeset viewer.