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

WordPress Trac noreply at wordpress.org
Wed Feb 15 21:44:58 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:  has-patch     |     Focuses:
--------------------------+-----------------------------

Comment (by peterwilsoncc):

 Replying to [comment:8 tillkruess]:
 > Since `_get_non_cached_ids()` is no longer marked as `private`, should
 we inform the user that a non-integer was given using a
 `_doing_it_wrong()` call, [https://github.com/WordPress/wordpress-
 develop/blob/0cb8475c0d07d23893b1d73d755eda5f12024585/src/wp-includes
 /class-wp-object-cache.php#L156-L165 like we did here]? Otherwise this may
 lead to silent misbehavior.

 Yes, let's go with consistency.

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


More information about the wp-trac mailing list