Problem/Motivation

We should avoid using the PHP global $_REQUEST and instead use Drupal services that provide the same info.

Steps to reproduce

n/a

Proposed resolution

Use Drupal services instead.

Remaining tasks

n/a

User interface changes

n/a

API changes

n/a

Data model changes

n/a

Issue fork legal-3318620

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

alecsmrekar created an issue. See original summary.

alecsmrekar’s picture

Assigned: alecsmrekar » Unassigned
Status: Active » Needs review
anybody’s picture

Category: Task » Bug report

Yes, I think this is against Drupal best practices. We should rate this as bug. Thanks!

anybody’s picture

Version: 2.0.x-dev » 3.0.x-dev

  • Robert Castelo committed 18e16f7f on 3.0.x
    git commit -m 'Issue #3318620 by alecsmrekar: Stop using $_REQUEST...
robert castelo’s picture

Status: Needs review » Fixed

  • Robert Castelo committed 2b31de80 on 3.0.x
    Reverting part of "Issue #3318620 by alecsmrekar: Stop using $_REQUEST...
robert castelo’s picture

I wasn't able to change the second $_REQUEST to \Drupal::destination()->get() as it gives different results and breaks redirects.

\Drupal::destination()->get() will always return a default redirect path for a form, $_REQUEST['destination'] returns an empty string if it's not set.

Status: Fixed » Closed (fixed)

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