Skip to content

Commit be0925e

Browse files
author
Mubashar Ahmad
committed
no message
1 parent 7ed74af commit be0925e

File tree

1 file changed

+8
-7
lines changed

1 file changed

+8
-7
lines changed

src/Http/dialog.php

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
<?php
22

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;
66

77
session()->start();
88

@@ -1215,12 +1215,13 @@ class="<?php echo($file == ".." ? "back-" : ""); ?>directory" data-type="<?php e
12151215
$creation_thumb_path = $mini_src = $src_thumb = $thumbs_path . $file;
12161216

12171217
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) {
12191223
$src_thumb = $mini_src = "";
12201224
}
1221-
/*if (!RFM::createImg($ftp, __DIR__ . '/' . $file_path, __DIR__ . '/' . $creation_thumb_path, 122, 91, 'crop', $config)) {
1222-
$src_thumb = $mini_src = "";
1223-
}*/
12241225
}
12251226
//check if is smaller than thumb
12261227
list($img_width, $img_height, $img_type, $attr) = @getimagesize(public_path($file_path));

0 commit comments

Comments
 (0)