[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 22:03:25 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
------------------------------+---------------------------------------------
Comment(by phasetransitions):
Replying to [comment:3 nacin]:
> Anything that doesn't evaluate to false, evaluates to true.
>
> 0 == array() == `''` == '0' == null == false
>
> Anything else == true
Gotcha, that's clear.
I decided to read the PHP documentation:
http://www.php.net/manual/en/language.types.integer.php#language.types.integer.casting
"Converting to integer
To explicitly convert a value to integer, use either the (int) or
(integer) casts. However, in most cases the cast is not needed, since a
value will be automatically converted if an operator, function or control
structure requires an integer argument. A value can also be converted to
integer with the intval() function.
See also: type-juggling.
From booleans
FALSE will yield 0 (zero), and TRUE will yield 1 (one)."
--
Ticket URL: <http://core.trac.wordpress.org/ticket/15293#comment:4>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list