Skip to content
Snippets Groups Projects
Commit 2c264f83 authored by Thomas Tanghus's avatar Thomas Tanghus
Browse files

Contacts: Better checks for GD library.

parent 76b8d062
No related branches found
No related tags found
No related merge requests found
......@@ -26,6 +26,11 @@ if(is_null($id)) {
getStandardImage();
}
if(!extension_loaded('gd') || !function_exists('gd_info')) {
OCP\Util::writeLog('contacts','photo.php. GD module not installed',OCP\Util::DEBUG);
getStandardImage();
}
$contact = OC_Contacts_App::getContactVCard($id);
$image = new OC_Image();
if(!$image) {
......
......@@ -32,7 +32,7 @@ function getStandardImage(){
OCP\Response::redirect(OCP\Util::imagePath('contacts', 'person.png'));
}
if(!function_exists('imagecreatefromjpeg')) {
if(!extension_loaded('gd') || !function_exists('gd_info')) {
OCP\Util::writeLog('contacts','thumbnail.php. GD module not installed',OCP\Util::DEBUG);
getStandardImage();
exit();
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment