I have code that resizes images using Imagick or GD, depending on what is available on the server.
I test the availability of each of them using a function extension_loaded().
if (extension_loaded('imagick')) {
$image = new Imagick();
...
}
I have one user who reports that they receive:
Fatal error: class "Imagick" not found
What circumstances will cause the Imagick extension to load, but the class is not available? How should I test to make my code more reliable?
drewm source
share