8000
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents f59bcfe + 48c5656 commit f5ec6b5Copy full SHA for f5ec6b5
Response.php
@@ -226,6 +226,11 @@ public function __construct($content = '', $status = 200, $headers = array())
226
$this->setStatusCode($status);
227
$this->setProtocolVersion('1.0');
228
229
+ /* RFC2616 - 14.18 says all Responses need to have a Date */
230
+ if (!$this->headers->has('Date')) {
231
+ $this->setDate(\DateTime::createFromFormat('U', time()));
232
+ }
233
+
234
// Deprecations
235
$class = get_class($this);
236
if ($this instanceof \PHPUnit_Framework_MockObject_MockObject || $this instanceof \Prophecy\Doubler\DoubleInterface) {
@@ -242,11 +247,6 @@ public function __construct($content = '', $status = 200, $headers = array())
242
247
@trigger_error(sprintf('Extending %s::%s() in %s is deprecated since version 3.2 and won\'t be supported anymore in 4.0 as it will be final.', __CLASS__, $method, $class), E_USER_DEPRECATED);
243
248
}
244
249
245
-
246
- /* RFC2616 - 14.18 says all Responses need to have a Date */
- if (!$this->headers->has('Date')) {
- $this->setDate(\DateTime::createFromFormat('U', time()));
- }
250
251
252
/**