Skip to content

Commit 5035a0f

Browse files
asmecherGaziYucel
authored andcommitted
Fix exception message in case of null view
1 parent 85bd179 commit 5035a0f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

classes/mail/Mailer.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ protected function renderView($view, $data): string
7676
}
7777

7878
if (!is_string($view)) {
79-
throw new InvalidArgumentException('View must be instance of ' . Htmlable::class . ' or a string, ' . get_class($view) . ' is given');
79+
throw new InvalidArgumentException('View must be instance of ' . Htmlable::class . ' or a string, ' . ($view === null ? 'null' : get_class($view)) . ' is given');
8080
}
8181

8282
return $this->compileParams($view, $data);

0 commit comments

Comments
 (0)