Skip to content

Commit

Permalink
Fix exception message in case of null view
Browse files Browse the repository at this point in the history
  • Loading branch information
asmecher committed Nov 25, 2024
1 parent fa82bbe commit 0adc303
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion classes/mail/Mailer.php
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ protected function renderView($view, $data): string
}

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

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

0 comments on commit 0adc303

Please sign in to comment.