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
I've been testing my last pull request today by throwing a bunch of junk data at the plugin to see how it handles it. Found an issue affecting every "file_get_contents" function call. Here's an example when a bad API Key string is supplied:
file_get_contents (wp-content/plugins/acf-typography-field/includes/functions.php => 45)
file_get_contents(https://www.googleapis.com/webfonts/v1/webfonts?key=BAD_API_KEY_STRING): failed to open stream: HTTP request failed! HTTP/1.0 400 Bad Request
I'm already patching this. PR will also include this patch.
In admin_settings.php:
It will now check the key against the Google API Key URL. If it encounters any errors, a message will be displayed showing the response header error message.
In functions.php:
Every "file_get_contents" function will suppress displaying error messages publicly and only process the output if there was no error message.
Idea / Enhancement - Possibly add a debug log and an "enable/disable debugging" admin setting to capture file and URL read/write errors?
The text was updated successfully, but these errors were encountered:
I've been testing my last pull request today by throwing a bunch of junk data at the plugin to see how it handles it. Found an issue affecting every "file_get_contents" function call. Here's an example when a bad API Key string is supplied:
I'm already patching this. PR will also include this patch.
In admin_settings.php:
It will now check the key against the Google API Key URL. If it encounters any errors, a message will be displayed showing the response header error message.
In functions.php:
Every "file_get_contents" function will suppress displaying error messages publicly and only process the output if there was no error message.
Idea / Enhancement - Possibly add a debug log and an "enable/disable debugging" admin setting to capture file and URL read/write errors?
The text was updated successfully, but these errors were encountered: