Skip to main content
improved grammar
Source Link
avpaderno
  • 97.9k
  • 15
  • 164
  • 284

CodeYou need to be replaced withreplace the calls to drupal_goto($url); :-.

Write this use statementline at top of the file-.

use \Symfony\Component\HttpFoundation\RedirectResponse;

Rest code isReplace the call to replace drupal_goto($url)drupal_goto() with the following code.

$response = new RedirectResponse($url); // $url = '<front>';
$response->send();

Code to be replaced with drupal_goto($url); :-

Write this use statement at top of the file-

use \Symfony\Component\HttpFoundation\RedirectResponse;

Rest code is to replace drupal_goto($url)

$response = new RedirectResponse($url); // $url = '<front>';
$response->send();

You need to replace the calls to drupal_goto().

Write this line at top of the file.

use \Symfony\Component\HttpFoundation\RedirectResponse;

Replace the call to drupal_goto() with the following code.

$response = new RedirectResponse($url); // $url = '<front>';
$response->send();
Source Link
Ashish Deynap
  • 1.5k
  • 1
  • 14
  • 26

Code to be replaced with drupal_goto($url); :-

Write this use statement at top of the file-

use \Symfony\Component\HttpFoundation\RedirectResponse;

Rest code is to replace drupal_goto($url)

$response = new RedirectResponse($url); // $url = '<front>';
$response->send();