Skip to content

Commit 8f42222

Browse files
authored
Update FilesUploadAndImageResize.php
1 parent ddfdc63 commit 8f42222

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

src/FilesUploadAndImageResize.php

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -166,6 +166,12 @@ public function createDir(string $fileDestination, int $filePermission): string
166166
public function uploadFiles(string $fileParamName, int $minImgWidth = 400, array $waterMark, string $reName = "", int $quality = 100, string $newWidth = "", array $thumbWidth = []): array|string
167167
{
168168
try {
169+
if (!extension_loaded('gd')) {
170+
if (!dl('gd.so')) {
171+
$this->param['gd_extension'][] = 'Check your php.ini file and enable or insatll GD extension'; //Bad extensions move in this array
172+
exit;
173+
}
174+
}
169175
if (!empty($_FILES[$fileParamName])) {
170176

171177
$srcPath = $this->createDir($this->fileDestination, $this->filePermission) . '/';

0 commit comments

Comments
 (0)