diff options
| author | Michael Save <savetheinternet@tinyboard.org> | 2012-03-18 00:57:11 +1100 |
|---|---|---|
| committer | Michael Save <savetheinternet@tinyboard.org> | 2012-03-18 00:57:11 +1100 |
| commit | b561066a4c818ddd83a5905a4e6482dcabf3fe3d (patch) | |
| tree | 0662b4eaaff4838b64ea2ce53173fd27bd120e7b | |
| parent | ff172eb418e50b6d6f91720097d723a6841a7066 (diff) | |
convert: Suppress warnings when trying to delete temporary file.
| -rw-r--r-- | inc/image.php | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/inc/image.php b/inc/image.php index c78e290d..63d6f9b5 100644 --- a/inc/image.php +++ b/inc/image.php @@ -242,14 +242,14 @@ return $this->height; } public function destroy() { - unlink($this->temp); + @unlink($this->temp); } public function resize() { global $config; $quality = $config['thumb_quality'] * 10; - if(shell_exec("convert -flatten -antialias -filter Point -scale {$this->width}x{$this->height} -quality {$quality} " . escapeshellarg($this->src . '[0]') . " " . escapeshellarg($this->temp)) || !file_exists($this->temp)) + if(shell_exec("convert -flatten -filter Point -scale {$this->width}x{$this->height} +antialias -quality {$quality} " . escapeshellarg($this->src . '[0]') . " " . escapeshellarg($this->temp)) || !file_exists($this->temp)) error('Failed to resize image!'); } } |
