Closed webster closed 8 years ago
This is a great addition - thanks!
To be consistent with the how AmberNetworkUtils.php
checks for the presence of cURL, we should probably use:
in_array("curl", get_loaded_extensions())
rather than
function_exists('curl_init')
Currently the Amber WordPress plugin silently fails to create snapshots if the PHP cURL extension isn't installed, showing all links in the Amber Dashboard with a "Down" status. The error log shows:
PHP message: .../amberlink/libraries/AmberNetworkUtils.php:AmberNetworkUtils::open_multi_url:CURL not installed
. This can be difficult for an end user to research and debug, and installing the cURL extension resolves the issue.This pull request adds a check to see if the cURL extension is installed, and throws an error message if it is not, in a manner consistent with the permalink error messages currently in use in the plugin. Additionally, it updates the README to reflect the PHP cURL extension requirement.