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::onRESTwp_worthy::onRESTwill then try to access$handler['callback']as an indexed array.Our plugin, for various technical reasons, passes a closure as the
callbackfor many REST routes.Because of this, your plugin will throw an exception at
wp-worthy.php:537when 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
The topic ‘Fatal error in wp-worthy.php’ is closed to new replies.