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

WordPress Trac noreply at wordpress.org
Thu Feb 2 20:27:56 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:
--------------------------+-----------------------------
Changes (by spacedmonkey):

 * keywords:   => needs-patch
 * version:  trunk => 5.5
 * milestone:  Awaiting Review => Future Release


Comment:

 How about a simplier solution like this?

 {{{#!php
 function _get_non_cached_ids( $object_ids, $cache_key ) {
         $non_cached_ids = array();
         $object_ids = array_filter( $object_ids, 'is_scalar' );

 }}}

 [48055] for extra context.

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


More information about the wp-trac mailing list