diff options
| author | Michael Foster <savetheinternet@tinyboard.org> | 2013-08-03 00:22:28 -0400 |
|---|---|---|
| committer | Michael Foster <savetheinternet@tinyboard.org> | 2013-08-03 00:22:28 -0400 |
| commit | 1d37e81adeea9b2a1bc1028f2bf45b47ac045ec4 (patch) | |
| tree | d4597976f069d51d25768d0fbd16e586947be655 /inc/image.php | |
| parent | 62f8ea4813092b42a2cd390a8358ce798d103f40 (diff) | |
Better error handling/displaying with $config['debug'] and $config['verbose_errors']
Diffstat (limited to 'inc/image.php')
| -rw-r--r-- | inc/image.php | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/inc/image.php b/inc/image.php index 141973ee..4fc9d018 100644 --- a/inc/image.php +++ b/inc/image.php @@ -287,16 +287,16 @@ class ImageConvert extends ImageBase { if (trim($error = shell_exec("gifsicle --unoptimize -O2 --resize {$this->width}x{$this->height} < " . escapeshellarg($this->src . '') . " \"#0-{$config['thumb_keep_animation_frames']}\" > " . escapeshellarg($this->temp) . '2>&1 &&echo $?') !== '0') || !file_exists($this->temp)) - error($error); + error('Failed to resize image!', null, $error); } else { - if (trim($error = shell_exec('convert ' . sprintf($config['convert_args'], '', $this->width, $this->height) . ' ' . + if (trim($error = shell_exec('aconvert ' . sprintf($config['convert_args'], '', $this->width, $this->height) . ' ' . escapeshellarg($this->src) . ' ' . escapeshellarg($this->temp) . ' 2>&1 &&echo $?')) !== '0' || !file_exists($this->temp)) - error($error); + error('Failed to resize image!', null, $error); } } else { - if (trim($error = shell_exec('convert ' . sprintf($config['convert_args'], '-flatten', $this->width, $this->height) . ' ' . + if (trim($error = shell_exec('aconvert ' . sprintf($config['convert_args'], '-flatten', $this->width, $this->height) . ' ' . escapeshellarg($this->src . '[0]') . " " . escapeshellarg($this->temp) . ' 2>&1 &&echo $?')) !== '0' || !file_exists($this->temp)) - error($error); + error('Failed to resize image!', null, $error); } } } |
