Remove dead code from node_filter_form()

Created on 7 June 2011, about 13 years ago
Updated 13 May 2024, about 2 months ago

we have code in node_filter_form() to deal with a 'term' filter:

    if ($type == 'term') {
      // Load term name from DB rather than search and parse options array.
      $value = module_invoke('taxonomy', 'term_load', $value);
      $value = $value->name;
    }

and later on in the same foreach():

   $t_args = array('%property' => $filters[$type]['title'], '%value' => $value);

problem is that node_filters(), which sets the $filters variable, can never return a $type = 'term' key for that array. so if any other code happens to set a 'term' filter, we'll get notices at that point.

we also handle the 'term' filter elsewhere, but again, if it was ever set, we'd get notices on the node admin screen.

is this code left over from D6? i think we should be killing it.

🐛 Bug report
Status

Fixed

Version

7.0 ⚰️

Component
Base 

Last updated about 2 hours ago

Created by

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.69.0 2024