In [59889] the REST API controllers were adjusted to perform less work when responding to HEAD requests. The WP_REST_Response body would now be `null`, which caused issues with filters that expected the response body to be an array. This commit sets the response body to be an empty array when preparing the response instead. The body will still be discarded, but this provides better backward comppatibility with code that assumes an array will be used. See #56481. Props antonvlasenko, timothyblynjacobs, mamaduka, wildworks. Built from https://develop.svn.wordpress.org/trunk@59970 git-svn-id: http://core.svn.wordpress.org/trunk@59312 1a063a9b-81f0-0310-95a4-ce76da25c4cd
57 KiB
57 KiB