Skip to content

Commit

Permalink
bug #40043 [HttpFoundation] Setting REQUEST_TIME_FLOAT when constru…
Browse files Browse the repository at this point in the history
…cting a Request object (ctasada)

This PR was merged into the 4.4 branch.

Discussion
----------

[HttpFoundation] Setting `REQUEST_TIME_FLOAT` when constructing a Request object

| Q             | A
| ------------- | ---
| Branch?       | 4.4
| Bug fix?      | yes
| New feature?  | no
| Deprecations? | no
| Tickets       | Fix #38019
| License       | MIT
| Doc PR        | -

When creating a new Request object `REQUEST_TIME_FLOAT` was not set by default.

Replaces broken 39952 PR :(

Commits
-------

c52c1e0b9b [HttpFoundation] Setting `REQUEST_TIME_FLOAT` when constructing a Request object
  • Loading branch information
fabpot committed Feb 5, 2021
2 parents 234ef21 + 63a198b commit 09e16fb
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions Request.php
Original file line number Diff line number Diff line change
Expand Up @@ -333,6 +333,7 @@ public static function create($uri, $method = 'GET', $parameters = [], $cookies
'SCRIPT_FILENAME' => '',
'SERVER_PROTOCOL' => 'HTTP/1.1',
'REQUEST_TIME' => time(),
'REQUEST_TIME_FLOAT' => microtime(true),
], $server);

$server['PATH_INFO'] = '';
Expand Down

0 comments on commit 09e16fb

Please sign in to comment.