[wp-trac] [WordPress Trac] #9441: Code Quality: Use of a global Variable instead of a function with a static local variable

WordPress Trac wp-trac at lists.automattic.com
Thu Apr 2 12:49:52 GMT 2009


#9441: Code Quality: Use of a global Variable instead of a function with a static
local variable
--------------------------+-------------------------------------------------
 Reporter:  hakre         |       Owner:  anonymous 
     Type:  defect (bug)  |      Status:  new       
 Priority:  normal        |   Milestone:  Unassigned
Component:  General       |     Version:            
 Severity:  normal        |    Keywords:            
--------------------------+-------------------------------------------------
 function force_ssl_admin (wp-includes/functions.php line ~2963ff) only
 exists to set a static variable inside that function.

 instead a global variable can be used.

 even the global variable might not be used, because since 2.6 a constant
 FORCE_SSL_ADMIN does exists.

 I suggest to remove the function and replace the places where it is called
 with either setting a (global) variable or getting it.

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


More information about the wp-trac mailing list