Part of #1998638: Replace almost all remaining superglobals ($_GET, $_POST, etc.) with Symfony Request object

Files that need converting are:

  • core/modules/aggregator/tests/aggregator_test.module
Files: 
CommentFileSizeAuthor
#3 1999338-3-aggregator_test-SERVER-variable-replacement.patch1006 byteschertzog
PASSED: [[SimpleTest]]: [MySQL] 55,913 pass(es).
[ View ]
#1 1999338-1-aggregator_test-SERVER-variable-replacement.patch1.13 KBchertzog
FAILED: [[SimpleTest]]: [MySQL] Invalid PHP syntax in core/modules/aggregator/tests/aggregator_test.module.
[ View ]

Comments

Status:Active» Needs review
StatusFileSize
new1.13 KB
FAILED: [[SimpleTest]]: [MySQL] Invalid PHP syntax in core/modules/aggregator/tests/aggregator_test.module.
[ View ]

First shot.

Status:Needs review» Needs work

The last submitted patch, 1999338-1-aggregator_test-SERVER-variable-replacement.patch, failed testing.

Status:Needs work» Needs review
StatusFileSize
new1006 bytes
PASSED: [[SimpleTest]]: [MySQL] 55,913 pass(es).
[ View ]

stupid syntax.

Assigned:Unassigned» chertzog

Status:Needs review» Reviewed & tested by the community

Not using Drupal::request()->server->has('...') as replacement of the original isset($_SERVER['...']) is ok here. Without the consumed server value, the returned value of strtotime() and stripslashes will be NULL and "". Since $if_modified_since and $if_none_match are compared to expected values using ==, the behavior should be the same.

Status:Reviewed & tested by the community» Fixed

Committed/pushed to 8.x, thanks!

Status:Fixed» Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.