[wp-trac] [WordPress Trac] #15293: Variable problem for debug between class-phpmailer and class-smtp

WordPress Trac wp-trac at lists.automattic.com
Tue Nov 2 17:33:50 UTC 2010


#15293: Variable problem for debug between class-phpmailer and class-smtp
------------------------------+---------------------------------------------
 Reporter:  phasetransitions  |       Owner:                                                
     Type:  defect (bug)      |      Status:  new                                           
 Priority:  normal            |   Milestone:  Awaiting Review                               
Component:  General           |     Version:  3.0.1                                         
 Severity:  minor             |    Keywords:  SMTP_Debug do_debug class-phpmailer class-smtp
------------------------------+---------------------------------------------
 In "class-phpmailer” and on line 227 there is a boolean for debugging:
 $SMTPDebug whose default value is boolean 'false.' This looks like it is
 passed to the variable $do_debug inside "class-smtp" on line 584.

 Inside class-smtp variable $do_debug is defined on line 55.  The comments
 indicate do_debug as boolean.  do_debug is initialized on line 80 of
 "class-smtp" to value 0, not a boolean.

 do_debug appears to have four values (0, 1, 2, 4) inside "class-smtp,"
 even though it is commented as boolean, and SMTP_Debug in "class-
 phpmailer" is boolean.

 "class-smtp" echoes different degrees of debug detail at do_debug 1, 2,
 and 4. Value 4 is for internal debug of "class-smtp"

 I’m not a php programmer, so perhaps “false” gets cast as “0″ into
 "class-smtp"?  If this is not the case, then it appears to me that "class-
 phpmailer" needs to pass a value of (0, 1, 2, 4) to do_debug depending on
 the state of the boolean SMTP_Debug.

 This came out of my trying to diagnose problems at fsockopen in "class-
 smtp" when configuring smtp over SSL with Google on my shared hosting.

 -Phil G

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


More information about the wp-trac mailing list