forked from leftypol/leftypol
Better error handling/displaying with $config['debug'] and $config['verbose_errors']
This commit is contained in:
parent
62f8ea4813
commit
1d37e81ade
5 changed files with 49 additions and 19 deletions
|
@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue