[wp-trac] [WordPress Trac] #40163: PHP 7 bug in nav-menu.php

WordPress Trac noreply at wordpress.org
Wed Mar 15 14:40:22 UTC 2017


#40163: PHP 7 bug in nav-menu.php
--------------------------+-----------------------------
 Reporter:  lucaspw       |      Owner:
     Type:  defect (bug)  |     Status:  new
 Priority:  normal        |  Milestone:  Awaiting Review
Component:  General       |    Version:
 Severity:  normal        |   Keywords:
  Focuses:                |
--------------------------+-----------------------------
 Hi

 In PHP 7 is bug in nav menus and wordpress respond error:

 <b>Notice</b>:  Array to string conversion in
 <b>/Applications/MAMP/htdocs/enginzyme/wp-includes/nav-menu.php</b> on
 line <b>604</b><br />

 This can be fast fix, you must replace this line:

 604. $items[$k]->$args['output_key'] = $i++;

 for:

 $items[$k]->{$args['output_key']} = $i++;

--
Ticket URL: <https://core.trac.wordpress.org/ticket/40163>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list