Problem/Motivation

I have a view where (not sure now), the $context['views_filter'] is not set at all when trying to getAvailableLocationOptions in ViewsProximityFilter.php.

I think the code

    if ($context['views_filter'] ?? FALSE) {
      return $options;
    }

introduces a logic bug (came from commit f51efad69). This returns FALSE if context['views_filter'] is not set, which allows it to continue to the code below, which fails when it tries to check $filter !== $context['views_filter']

I believe we need something like:

    if (empty($context['views_filter'])) {
      return $options;
    }

The let's me access my Settings form in the Views UI again.

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

chrisfromredfin created an issue. See original summary.

christianadamski made their first commit to this issue’s fork.

christianadamski’s picture

Status: Active » Fixed

Thanks!

Now that this issue is closed, review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, credit people who helped resolve this issue.

Status: Fixed » Closed (fixed)

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