WordPress.org

Make WordPress Core

Changeset 33427


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

Location:
trunk/src/wp-includes
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/class-wp-customize-setting.php

    r33366 r33427  
    11041104
    11051105            foreach ( $items as $k => $item ) {
    1106                 $items[ $k ]->$args['output_key'] = $i++;
     1106                $items[ $k ]->{$args['output_key']} = $i++;
    11071107            }
    11081108        }
  • 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.