Fatal error in wp-worthy.php
-
Hi there
Perry here from WP Google Maps, I hope this finds you well.
Your plugin binds a filter to
rest_request_before_callbacks
, which callswp_worthy::onREST
wp_worthy::onREST
will then try to access$handler['callback']
as an indexed array.Our plugin, for various technical reasons, passes a closure as the
callback
for many REST routes.Because of this, your plugin will throw an exception at
wp-worthy.php:537
when our plugin is active.Could we ask that you make a small change here in order to accommodate plugins that pass closure functions into the REST API?
Our suggested fix would be
$this->onRESTQuery = isset ($handler ['callback']) && !($handler['callback'] instanceof Closure) && ($handler ['callback'][0] instanceof WP_REST_Posts_Controller) && ($handler ['callback'][1] == 'get_item');
Please let us know what you think.
Kind regards
– Perry
Viewing 3 replies - 1 through 3 (of 3 total)
Viewing 3 replies - 1 through 3 (of 3 total)
- The topic ‘Fatal error in wp-worthy.php’ is closed to new replies.