You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
CRITICAL Uncaught TypeError: Argument 3 passed to WooCommerce\PayPalCommerce\ApiClient\Endpoint\OrderEndpoint::request_response_string() must be of the type array, object given
This error comes after the API answer and is causing the order processing to fail (or fatal errors in some places).
Is likely caused by this line which is supposed to log the answer in an array.
CRITICAL Uncaught TypeError: Argument 3 passed to WooCommerce\PayPalCommerce\ApiClient\Endpoint\OrderEndpoint::request_response_string() must be of the type array, object given
This error comes after the API answer and is causing the order processing to fail (or fatal errors in some places).
Is likely caused by this line which is supposed to log the answer in an array.
$this->logger->debug( $this->request_response_string( $url, $args, $response ) );
Most of the time it works, but sometimes when getting the API response we get an object instead of an array.
Steps to reproduce
api.paypal.com
via hosts or firewall.Expected behaviour
The error should be logged properly, not causing fatal errors during logging.
Possible cause
Not handling failed requests which may return
WP_Error
instead of response.The text was updated successfully, but these errors were encountered: