Skip to content

Commit c4069c1

Browse files
update
1 parent d2719ab commit c4069c1

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/FileHelper.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ public function extension()
4646
*/
4747
public function tmp()
4848
{
49-
return $this->data['tmp_name'];
49+
return $this->data['tmp_name'] ?? 'null';
5050
}
5151

5252
/**
@@ -68,7 +68,7 @@ public function name()
6868
public function mime()
6969
{
7070
return Str::lower(@mime_content_type(
71-
$this->data['tmp_name']
71+
$this->tmp()
7272
));
7373
}
7474

@@ -91,7 +91,7 @@ public function size()
9191
public function imageSize()
9292
{
9393
// get image attributes
94-
$imagePath = @getimagesize($this->data['tmp_name']);
94+
$imagePath = @getimagesize($this->tmp());
9595

9696
return [
9797
'width' => $imagePath[0] ?? null,

0 commit comments

Comments
 (0)