Skip to content
Browse files

only replace the headers if they are set

  • Loading branch information...
1 parent a8a9bff commit 4601376e17460b1078f20a2def31e31e39d0edad @lsmith77 lsmith77 committed
Showing with 3 additions and 1 deletion.
  1. +3 −1 View/View.php
View
4 View/View.php
@@ -108,7 +108,9 @@ public function __construct($data = null, $statusCode = null, array $headers = a
$this->data = $data;
$this->statusCode = $statusCode;
$this->templateVar = 'data';
- $this->getResponse()->headers->replace($headers);
+ if (!empty($headers)) {
+ $this->getResponse()->headers->replace($headers);
+ }
}
/**

0 comments on commit 4601376

Please sign in to comment.
Something went wrong with that request. Please try again.