Skip to content

Commit

Permalink
[5.4] Check Htmlable contract instead of instanceof HtmlString in Mai…
Browse files Browse the repository at this point in the history
…ler (#18459)

* Check Htmlable contract instead of instanceof HtmlString in Mailer

* Update Mailer.php
  • Loading branch information
jbraud authored and taylorotwell committed Mar 23, 2017
1 parent b2b1f99 commit c462ee9
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Illuminate/Mail/Mailer.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@
use Swift_Message;
use Illuminate\Support\Arr;
use InvalidArgumentException;
use Illuminate\Support\HtmlString;
use Illuminate\Contracts\View\Factory;
use Illuminate\Contracts\Support\Htmlable;
use Illuminate\Contracts\Events\Dispatcher;
use Illuminate\Contracts\Queue\ShouldQueue;
use Illuminate\Contracts\Mail\Mailer as MailerContract;
Expand Down Expand Up @@ -294,7 +294,7 @@ protected function addContent($message, $view, $plain, $raw, $data)
*/
protected function renderView($view, $data)
{
return $view instanceof HtmlString
return $view instanceof Htmlable
? $view->toHtml()
: $this->views->make($view, $data)->render();
}
Expand Down

0 comments on commit c462ee9

Please sign in to comment.