[wp-trac] [WordPress Trac] #20004: Fix NULL and FALSE in WP_Object_Cache and make found/not-found unambiguous.

WordPress Trac wp-trac at lists.automattic.com
Thu Feb 9 23:29:51 UTC 2012


#20004: Fix NULL and FALSE in WP_Object_Cache and make found/not-found unambiguous.
------------------------------------+------------------------------
 Reporter:  andy                    |       Owner:
     Type:  defect (bug)            |      Status:  new
 Priority:  normal                  |   Milestone:  Awaiting Review
Component:  Cache                   |     Version:
 Severity:  normal                  |  Resolution:
 Keywords:  has-patch dev-feedback  |
------------------------------------+------------------------------

Comment (by nacin):

 > Atomicity

 All that needed to be said. You're absolutely right.

 To me, the by-ref sounds like a better solution. It will also allow
 someone to do $found === true, $found === false, $found === null to
 determine whether the key was found, it wasn't found, or it hasn't been
 implemented for the object cache yet, the last one additionally causing a
 notice. It's elegant, if you ask me.

-- 
Ticket URL: <http://core.trac.wordpress.org/ticket/20004#comment:6>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list