[wp-trac] [WordPress Trac] #57593: Warn about calling `_get_non_cached_ids()` with invalid ids

WordPress Trac noreply at wordpress.org
Fri Feb 3 00:48:44 UTC 2023


#57593: Warn about calling `_get_non_cached_ids()` with invalid ids
--------------------------+-----------------------------
 Reporter:  tillkruess    |       Owner:  (none)
     Type:  defect (bug)  |      Status:  new
 Priority:  normal        |   Milestone:  Future Release
Component:  Cache API     |     Version:  5.5
 Severity:  major         |  Resolution:
 Keywords:  needs-patch   |     Focuses:
--------------------------+-----------------------------

Comment (by spacedmonkey):

 Replying to [comment:3 tillkruess]:
 > @spacedmonkey: That would allow `bool` keys, which often groups `false`
 into the same key unexpectedly.

 {{{#!php
 $object_ids = array_filter( $object_ids, function( $object_id ) {
    return is_scalar($object_id) && !is_bool( $object_id );
 });
 }}}

 How about this?

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/57593#comment:4>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list