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

Files that need converting are:

  • core/modules/file/file.install
  • core/modules/file/file.module
Files: 
CommentFileSizeAuthor
#7 1999370-file-request-5.patch1.72 KBkim.pepper
PASSED: [[SimpleTest]]: [MySQL] 57,804 pass(es). View
#7 interdiff.txt2.23 KBkim.pepper
#3 1999370_3-replace_raw-variables-file.patch2.79 KBchertzog
FAILED: [[SimpleTest]]: [MySQL] 55,510 pass(es), 319 fail(s), and 306 exception(s). View
#1 1999370_1-replace_raw-variables-file.patch2.79 KBchertzog
FAILED: [[SimpleTest]]: [MySQL] Invalid PHP syntax in core/modules/file/file.install. View

Comments

chertzog’s picture

Assigned: Unassigned » chertzog
Status: Active » Needs review
FileSize
2.79 KB
FAILED: [[SimpleTest]]: [MySQL] Invalid PHP syntax in core/modules/file/file.install. View

Status: Needs review » Needs work

The last submitted patch, 1999370_1-replace_raw-variables-file.patch, failed testing.

chertzog’s picture

Status: Needs work » Needs review
FileSize
2.79 KB
FAILED: [[SimpleTest]]: [MySQL] 55,510 pass(es), 319 fail(s), and 306 exception(s). View

missed a semicolon.

rbayliss’s picture

+++ b/core/modules/file/file.moduleundefined
@@ -738,8 +738,8 @@ function file_cron() {
-  if (empty($_POST['form_build_id']) || $form_build_id != $_POST['form_build_id']) {
+  $request = Drupal::request()->request->get('form_build_id');
+  if (empty($request) || $form_build_id != $request) {

$request is kind of confusing. How about $request_form_build_id?

Status: Needs review » Needs work

The last submitted patch, 1999370_3-replace_raw-variables-file.patch, failed testing.

kim.pepper’s picture

Are you still working on this chertzog?

kim.pepper’s picture

Status: Needs work » Needs review
FileSize
2.23 KB
1.72 KB
PASSED: [[SimpleTest]]: [MySQL] 57,804 pass(es). View

Had a go at making the changes above. Interdiff is messy because i started from scratch again.

Crell’s picture

Status: Needs review » Reviewed & tested by the community
Dries’s picture

Status: Reviewed & tested by the community » Fixed

Committed to 8.x. Thanks.

Status: Fixed » Closed (fixed)

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