[wp-trac] [WordPress Trac] #27841: Fix Custom Menu save notices when there are no menus created

WordPress Trac noreply at wordpress.org
Wed Apr 16 18:45:28 UTC 2014


#27841: Fix Custom Menu save notices when there are no menus created
--------------------------+-----------------------------
 Reporter:  nofearinc     |      Owner:
     Type:  defect (bug)  |     Status:  new
 Priority:  normal        |  Milestone:  Awaiting Review
Component:  Widgets       |    Version:  trunk
 Severity:  minor         |   Keywords:  has-patch
  Focuses:                |
--------------------------+-----------------------------
 When adding the Custom Menu widget on a clean 3.9 install without custom
 menus created upfront, two PHP notices are triggered:

     PHP Notice:  Undefined index: title in /opt/lampp/htdocs/wp39/wp-
 includes/default-widgets.php on line 1326, referer: http://localhost/wp39
 /wp-admin/widgets.php
     PHP Notice:  Undefined index: nav_menu in /opt/lampp/htdocs/wp39/wp-
 includes/default-widgets.php on line 1327, referer: http://localhost/wp39
 /wp-admin/widgets.php

 Adding an `isset()` check with default values before populating.

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


More information about the wp-trac mailing list