|
1 | 1 | <?php
|
2 | 2 |
|
3 |
| -use \ZanySoft\FtpClient\FtpException; |
4 |
| -use \Illuminate\Support\Str; |
5 |
| -use \ZanySoft\ResponsiveFileManager\RFM; |
| 3 | +use Illuminate\Support\Str; |
| 4 | +use ZanySoft\FtpClient\FtpException; |
| 5 | +use ZanySoft\ResponsiveFileManager\RFM; |
6 | 6 |
|
7 | 7 | session()->start();
|
8 | 8 |
|
@@ -1215,12 +1215,13 @@ class="<?php echo($file == ".." ? "back-" : ""); ?>directory" data-type="<?php e
|
1215 | 1215 | $creation_thumb_path = $mini_src = $src_thumb = $thumbs_path . $file;
|
1216 | 1216 |
|
1217 | 1217 | if (!file_exists($src_thumb)) {
|
1218 |
| - if (!RFM::createImg($ftp, public_path($file_path), public_path($creation_thumb_path), 122, 91, 'crop', $config)) { |
| 1218 | + try { |
| 1219 | + if (!RFM::createImg($ftp, public_path($file_path), public_path($creation_thumb_path), 122, 91, 'crop', $config)) { |
| 1220 | + $src_thumb = $mini_src = ""; |
| 1221 | + } |
| 1222 | + } catch (\Exception $e) { |
1219 | 1223 | $src_thumb = $mini_src = "";
|
1220 | 1224 | }
|
1221 |
| - /*if (!RFM::createImg($ftp, __DIR__ . '/' . $file_path, __DIR__ . '/' . $creation_thumb_path, 122, 91, 'crop', $config)) { |
1222 |
| - $src_thumb = $mini_src = ""; |
1223 |
| - }*/ |
1224 | 1225 | }
|
1225 | 1226 | //check if is smaller than thumb
|
1226 | 1227 | list($img_width, $img_height, $img_type, $attr) = @getimagesize(public_path($file_path));
|
|
0 commit comments