-
Notifications
You must be signed in to change notification settings - Fork 29
Open
Labels
enhancementNew feature or requestNew feature or request
Description
Description
If a consumer passes a string, it's likely they can get this error. Mainly because this is what is passed: array_map('absint', '18708892').
[11-Sep-2025 00:24:28 UTC] PHP Fatal error: Uncaught TypeError: array_map(): Argument #2 ($array) must be of type array, string given in /chroot/var/www/wp-content/mu-plugins/search/es-wp-query/class-es-wp-query-wrapper.php:608
This is present here, but it'd be great to fix in the true source.
My proposal would be to validate if it is an array before passing it to array_map.
Use Case
A query where post__in is a string.
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request