Have the OCSBaseResponse call the parent constructor
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
This commit is contained in:
parent
b42b26eceb
commit
5d94590cee
|
@ -57,6 +57,8 @@ abstract class BaseResponse extends Response {
|
||||||
$statusMessage = null,
|
$statusMessage = null,
|
||||||
$itemsCount = null,
|
$itemsCount = null,
|
||||||
$itemsPerPage = null) {
|
$itemsPerPage = null) {
|
||||||
|
parent::__construct();
|
||||||
|
|
||||||
$this->format = $format;
|
$this->format = $format;
|
||||||
$this->statusMessage = $statusMessage;
|
$this->statusMessage = $statusMessage;
|
||||||
$this->itemsCount = $itemsCount;
|
$this->itemsCount = $itemsCount;
|
||||||
|
@ -69,7 +71,6 @@ abstract class BaseResponse extends Response {
|
||||||
$this->setETag($dataResponse->getETag());
|
$this->setETag($dataResponse->getETag());
|
||||||
$this->setLastModified($dataResponse->getLastModified());
|
$this->setLastModified($dataResponse->getLastModified());
|
||||||
$this->setCookies($dataResponse->getCookies());
|
$this->setCookies($dataResponse->getCookies());
|
||||||
$this->setContentSecurityPolicy(new EmptyContentSecurityPolicy());
|
|
||||||
|
|
||||||
if ($format === 'json') {
|
if ($format === 'json') {
|
||||||
$this->addHeader(
|
$this->addHeader(
|
||||||
|
|
Loading…
Reference in New Issue