Warning: Illegal string offset 'center' in ProximityFilter->acceptExposedInput()

Created on 28 May 2020, almost 5 years ago
Updated 15 May 2024, 11 months ago
🐛 Bug report
Status

Closed: cannot reproduce

Version

3.2

Component

Geolocation Field / Backend

Created by

🇪🇸Spain echo15

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.

  • 🇬🇧United Kingdom Rob230

    I am seeing the same thing. Have tried changing it to a single filter and then back to grouped but it still has the same behaviour.

    The problem appears to be in here:

    public function acceptExposedInput($input): bool {
      parent::acceptExposedInput($input);
    
      $this->value['center'] = [];
    
      $identifier = $this->options['expose']['identifier'];
    
      if (!empty($input[$identifier . '_center'])) {
        $this->value['center'] = $input[$identifier . '_center'];
      }
    
      return TRUE;
    }
    

    $this->value is "3" (a string) which presumably corresponds to the option I chose in the grouped filter. Changing the string value with array syntax causes an error and results in bizarre things happening (it changes into another string "A" but xdebug seems to think it is a reference to a class).

  • 🇬🇧United Kingdom Rob230

    This patch fixes the problem.

Production build 0.71.5 2024