mirror of
https://github.com/Karaka-Management/phpOMS.git
synced 2026-01-11 09:48:40 +00:00
Prevent exception of arrays
This commit is contained in:
parent
244e2e8d86
commit
ee018f124f
|
|
@ -131,6 +131,8 @@ final class Response extends ResponseAbstract implements RenderableInterface
|
|||
$render .= $response->serialize();
|
||||
} elseif (\is_string($response) || \is_numeric($response)) {
|
||||
$render .= $response;
|
||||
} elseif (\is_array($response)) {
|
||||
$render .= \json_encode($response);
|
||||
} else {
|
||||
throw new \Exception('Wrong response type');
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user