summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--app/Template/file/show.php4
-rw-r--r--composer.json1
2 files changed, 4 insertions, 1 deletions
diff --git a/app/Template/file/show.php b/app/Template/file/show.php
index b181ab54..bfed94a5 100644
--- a/app/Template/file/show.php
+++ b/app/Template/file/show.php
@@ -4,14 +4,16 @@
<div class="page-header">
<h2><?= t('Attachments') ?></h2>
</div>
- <?php if (!empty($images)): ?>
+ <?php if (! empty($images)): ?>
<h3><?= t('Images') ?></h3>
<ul class="task-show-images">
<?php foreach ($images as $file): ?>
<li>
+ <?php if (function_exists('imagecreatetruecolor')): ?>
<div class="img_container">
<img src="<?= $this->u('file', 'thumbnail', array('width' => 250, 'file_id' => $file['id'], 'project_id' => $task['project_id'], 'task_id' => $file['task_id'])) ?>" alt="<?= $this->e($file['name']) ?>"/>
</div>
+ <?php endif ?>
<p>
<?= $this->e($file['name']) ?>
</p>
diff --git a/composer.json b/composer.json
index 3c8c74a4..79ec0abf 100644
--- a/composer.json
+++ b/composer.json
@@ -2,6 +2,7 @@
"require" : {
"php": ">=5.3",
"ext-mbstring" : "*",
+ "ext-gd": "*",
"fguillot/simple-validator" : "dev-master",
"swiftmailer/swiftmailer" : "@stable",
"fguillot/json-rpc" : "0.0.1",