API page: http://api.drupal.org/api/drupal/core%21modules%21search%21search.pages....

The function initialize the $redirect variable, but that variable is never used from the function, nor is the variable defined as global variable.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

apaderno’s picture

I checked the code used from the function in other Drupal versions. $redirect was introduced in Drupal 7, but the code has never used that variable, except when initializing it.

marcingy’s picture

Issue tags: +Novice

Tagging as novice

IshaDakota’s picture

Status: Active » Needs review
FileSize
477 bytes

Status: Needs review » Needs work
Issue tags: -Novice

The last submitted patch, drupal-remove-variable-1848774-3.patch, failed testing.

Berdir’s picture

Status: Needs work » Needs review
apaderno’s picture

Issue tags: +Novice
Berdir’s picture

Status: Needs review » Reviewed & tested by the community

Looks good.

catch’s picture

Status: Reviewed & tested by the community » Fixed

Committed/pushued to 8.x, thanks!

apaderno’s picture

Version: 8.x-dev » 7.x-dev
Status: Fixed » Needs review
FileSize
457 bytes

This is the patch for Drupal 7. The same variable that appears in the Drupal 8 code appears in Drupal 7's search_view().

Berdir’s picture

Status: Needs review » Reviewed & tested by the community

How do you always find that stuff? ;) Looks good.

apaderno’s picture

@Bedir I am the founder of the "Give home to an orphan variable" association. ;-)

David_Rothstein’s picture

Status: Reviewed & tested by the community » Fixed

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