[wp-trac] [WordPress Trac] #28637: get_theme_mod returns empty string instead of default

WordPress Trac noreply at wordpress.org
Wed Jun 25 20:57:42 UTC 2014


#28637: get_theme_mod returns empty string instead of default
--------------------------+------------------------------
 Reporter:  philipjohn    |       Owner:
     Type:  defect (bug)  |      Status:  new
 Priority:  normal        |   Milestone:  Awaiting Review
Component:  Customize     |     Version:  3.9.1
 Severity:  normal        |  Resolution:
 Keywords:                |     Focuses:  administration
--------------------------+------------------------------

Comment (by nofearinc):

 The patch does the following check:

 {{{
     if ( isset( $mods[$name] ) && ! isset( $mods[$name] ) ) {
 }}}

 Since it's an expression that always returns false ( 1 && 0 ), did you
 mean to test for

 {{{

     if ( ! empty( $mods[$name] ) ) {
 }}}

 or something else instead?

--
Ticket URL: <https://core.trac.wordpress.org/ticket/28637#comment:2>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list