[wp-trac] [WordPress Trac] #4440: Several importers use add_option "wrong"

WordPress Trac wp-trac at lists.automattic.com
Tue Jun 12 20:34:51 GMT 2007


#4440: Several importers use add_option "wrong"
----------------------------+-----------------------------------------------
 Reporter:  Nazgul          |       Owner:  anonymous  
     Type:  defect          |      Status:  new        
 Priority:  normal          |   Milestone:  2.3 (trunk)
Component:  Administration  |     Version:             
 Severity:  normal          |    Keywords:  needs-patch
----------------------------+-----------------------------------------------
 The dotclear and textpattern importers pass incorrect arguments to
 add_option.

 Function signature:
 {{{
 function add_option($name, $value = '', $description= '', $autoload =
 'yes')
 }}}

 Usage (pseudocode):
 {{{
 add_option('option', $value, true));
 }}}

 So they're passing true to the description parameter, which isn't quite
 usefull. On the other hand, passing true to autoload also won't work,
 because it has an implicit check for the string 'yes', which would fail.

 I don't have much experience with the importers and therefore don't know
 what the intended behaviour is and therefore don't know how to fix this. I
 just noticed this stange behaviour while working on another ticket.

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


More information about the wp-trac mailing list