Support » Plugin: dsIDXpress » WP 5.8 compatibility

  • Diverse team –

    Do you have WP 5.8 compatibility in the works? On 5.8, the widgets do not appear (they output the debug string for an empty response body), and cURL fatal errors occur:

    Fatal error: Uncaught Error: Object of class stdClass could not be converted to string in /home/xxxxxx/public_html/wp-includes/Requests/Transport/cURL.php:573 Stack trace: #0 /home/xxxxxx/public_html/wp-includes/Requests/Transport/cURL.php(332): Requests_Transport_cURL->get_expect_header(Object(stdClass)) #1 /home/xxxxxx/public_html/wp-includes/Requests/Transport/cURL.php(287): Requests_Transport_cURL->setup_handle('http://api-idx....', Array, Object(stdClass), Array) #2 /home/xxxxxx/public_html/wp-includes/Requests/Transport/cURL.php(209): Requests_Transport_cURL->get_subrequest_handle('http://api-idx....', Array, Object(stdClass), Array) #3 /home/xxxxxx/public_html/wp-includes/class-requests.php(482): Requests_Transport_cURL->request_multiple(Array, Array) #4 /home/xxxxxx/public_html/assets/plugins/dsidxpress/api-multirequest.php(41): Requests::request_multiple(Array, Array) #5 [internal function]: dsSearchAgent_ApiMultiRequest::GetBufferData('<!DOCTYPE html>...', 9) #6 /home/xxxxxx/public_html/wp-includes/functi in /home/xxxxxx/public_html/wp-includes/Requests/Transport/cURL.php on line 573

    The fix seems to be very simple: on line 32 of api-multirequest.php, change json_decode($parameters) to json_decode($parameters, true), which will cause the data key to contain an associative array instead of an object. The updated cURL portion of the Requests library comprehends this just fine.

    While you’re performing updates, please consider switching to accessing your API over HTTPS. The comment on line 24 of the above file reads “Since SSL certificate on ENV02 is not valid so curl will throw exception if we use https url so for initial testing we are using http url , it will be replaced later with proper url”. That obviously never happened, even though your SSL cert on is now valid.

    • This topic was modified 11 months, 2 weeks ago by FPCSJames.
Viewing 1 replies (of 1 total)
  • Thread Starter FPCSJames


    I see this fix was applied in 3.14.2, but nothing was done about accessing the API over HTTP instead of HTTPS (for no valid reason), and no reply ever landed here. Stellar support as always, folks.

Viewing 1 replies (of 1 total)
  • The topic ‘WP 5.8 compatibility’ is closed to new replies.