Skip to content

Commit

Permalink
[10.x] Fix in appendExceptionToException method exception type check (#…
Browse files Browse the repository at this point in the history
…49958)

* Fix in appendExceptionToException method exception type check

* Update TestResponse.php

---------

Co-authored-by: Taylor Otwell <taylor@laravel.com>
  • Loading branch information
t1nkl and taylorotwell authored Feb 8, 2024
1 parent b474a36 commit 0c830e7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Illuminate/Testing/TestResponse.php
Original file line number Diff line number Diff line change
Expand Up @@ -1651,7 +1651,7 @@ public function transformNotSuccessfulException($exception)
*/
protected function appendExceptionToException($exceptionToAppend, $exception)
{
$exceptionMessage = $exceptionToAppend->getMessage();
$exceptionMessage = is_string($exceptionToAppend) ? $exceptionToAppend : $exceptionToAppend->getMessage();

$exceptionToAppend = (string) $exceptionToAppend;

Expand Down

0 comments on commit 0c830e7

Please sign in to comment.