WordPress Warning:

“Warning: http_build_query(): Parameter 1 expected to be Array or Object. Incorrect value given in /home/volunte4/public_html/wp-includes/Requests/Transport/cURL.php on line 508”

I found this error occurring within the Events plugin All-in-One Event Calendar by Time.ly after I had moved a website from the development hosting to the live hosting.

Offhand, I couldn’t work out why this was occurring, and when I searched the internet for why this was happening, the results were suggesting to disable all plugins and restart each one until the error occurred again and identify the problem.

However, before I had to delve much further, I remembered that I had set up a Google API (Google Maps JavaScript API) for the map functionality within the plugin, and after the migration to the new server, I hadn’t updated the Key Restriction HTTP referrers which lets me specify which websites can use this key.

Once I saved the updated website address at https://console.developers.google.com/apis, updated the API Key in the Plugin settings, and refreshed the page, the error message had disappeared.

This error can occur for a variety of reasons but I wanted to log another instance of why it can occur.

Do you find this plugin useful? Has this warning occurred for any other reason for you?