Skip to content

Commit e5b7471

Browse files
committed
Added error handling to manage edge cases.
1 parent 481cd61 commit e5b7471

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/Upload.php

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -315,7 +315,11 @@ public function validate()
315315
public function replaceStr(&$text)
316316
{
317317
$text = str_replace('@name', $this->getClientOriginalName(), $text);
318+
319+
318320
$text = str_replace('@size', $this->size(), $text);
319-
$text = str_replace('@maxSize', $this->maxSize['number'], $text);
321+
322+
if($this->maxSize)
323+
$text = str_replace('@maxSize', $this->maxSize['number'], $text);
320324
}
321325
}

0 commit comments

Comments
 (0)