Skip to content

Commit 2af8868

Browse files
fMadswing328
authored andcommitted
Fixed #7137 by checking for Response before calling getBody() on it (#7138)
1 parent cfa5a55 commit 2af8868

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

modules/swagger-codegen/src/main/resources/php/api.mustache

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,7 @@ use {{invokerPackage}}\ObjectSerializer;
131131
"[{$e->getCode()}] {$e->getMessage()}",
132132
$e->getCode(),
133133
$e->getResponse() ? $e->getResponse()->getHeaders() : null,
134-
$e->getResponse()->getBody()->getContents()
134+
$e->getResponse() ? $e->getResponse()->getBody()->getContents() : null
135135
);
136136
}
137137

0 commit comments

Comments
 (0)