Closed nlemoine closed 1 year ago
Or is this for a custom REST API endpoint that is setting data differently?
Yes, I stumbled upon this issue with Yoast SEO: https://github.com/Yoast/wordpress-seo/blob/b65a01a4e121eac60b4614ef637bcdaa20545e36/src/routes/alert-dismissal-route.php#L89 (not that exact example, this is only intended to confirm that sometimes, objects can be returned).
Hello @mattheu,
Any news about this? :)
I apologise! Totally slipped my mind.
Thanks! :)
Check that
$data
is an array before checking ifREST_PARAM
is set. Avoid triggeringCannot use object of type stdClass as array
when response data is an object.