[wp-trac] [WordPress Trac] #11391: logic error bug in php 5.3.0 probably needs attention in WP

WordPress Trac wp-trac at lists.automattic.com
Thu Dec 10 22:00:56 UTC 2009


#11391: logic error bug in php 5.3.0 probably needs attention in WP
-------------------------------+--------------------------------------------
 Reporter:  Denis-de-Bernardy  |       Owner:     
     Type:  defect (bug)       |      Status:  new
 Priority:  normal             |   Milestone:  2.9
Component:  General            |     Version:  2.9
 Severity:  major              |    Keywords:     
-------------------------------+--------------------------------------------
 {{{
 $foo = 0;
 var_dump('foo' == $foo); // true
 var_dump($foo == 'foo'); // true
 var_dump('foo' === $foo); // false
 var_dump($foo === 'foo'); // false
 var_dump(phpversion());
 }}}

 I encountered this obscure bug while looking into why memcached was
 returning false, when I definitely knew it contained 0. And, sure enough:

 http://plugins.trac.wordpress.org/browser/memcached/trunk/object-
 cache.php?rev=74855#L265

 http://plugins.trac.wordpress.org/browser/memcached/trunk/object-
 cache.php?rev=74855#L203

 I haven't tested if it affected php 5.3.1 yet.

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


More information about the wp-trac mailing list