[wp-trac] [WordPress Trac] #10706: foce_ssl_admin/login don't work if the argument is false

WordPress Trac wp-trac at lists.automattic.com
Mon Aug 31 20:58:14 UTC 2009


#10706: foce_ssl_admin/login don't work if the argument is false
--------------------------+-------------------------------------------------
 Reporter:  nbachiyski    |       Owner:           
     Type:  defect (bug)  |      Status:  new      
 Priority:  normal        |   Milestone:  2.8.5    
Component:  General       |     Version:           
 Severity:  normal        |    Keywords:  has-patch
--------------------------+-------------------------------------------------
 Expected: {{{force_ssl_admin()}}} to set the static var inside the
 function to false.

 Actual: nothing happens.

 The condition on which the value is changed is {{{if ( '' != $force )}}},
 which can't be fulfilled by any false value. The condition is equal to
 {{{if ( false != $force)}}}.

 Here is a patch, which uses {{{null}}} as a default value and checks using
 {{{is_null()}}}. Similar effect can be accomplished by using {{{!==}}},
 but the prefer seems to convey better the meaninglessness of the default
 value.

-- 
Ticket URL: <http://core.trac.wordpress.org/ticket/10706>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list