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.

Comments

avpaderno’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
StatusFileSize
new477 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
avpaderno’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!

avpaderno’s picture

Version: 8.x-dev » 7.x-dev
Status: Fixed » Needs review
StatusFileSize
new457 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.

avpaderno’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.