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

WordPress Trac noreply at wordpress.org
Fri Feb 3 17:39:51 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 tillkruess):

 Yeah, I think `is_numeric()` would be strict-ish enough.

 Most edge cases like `42.0` or `"1337e0"` are so rare, we only really need
 to protect against `false` and `null` and other gross type mismatches.

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


More information about the wp-trac mailing list