With last Leaflet module version I have two warnings at every LeafletDefaultFormatter rendering.
Warning: count(): Parameter must be an array or an object that implements Countable в Drupal\leaflet\Plugin\Field\FieldFormatter\LeafletDefaultFormatter->viewElements() (line 344 ...
And the same for line 343
These line contains the following code:
$settings['icon']['iconUrl'] = count($settings['icon']['iconUrl']) > 0 ? $this->token->replace($settings['icon']['iconUrl'], $token_context) : '';
$settings['icon']['shadowUrl'] = count($settings['icon']['shadowUrl']) > 0 ? $this->token->replace($settings['icon']['shadowUrl'], $token_context) : '';
Obviously, 'count' should be replaced by 'strlen'.
Comments
Comment #2
gun_dose commentedAnd this is patch to fix this.
Comment #3
itamair commentedThanks @gun_dose perfectly right. But for sake of uniformity (with the Leaflet View Display style) let's use this attached patch instead.
Comment #5
itamair commentedjust committed into dev, will be part of the next release ...
Comment #6
itamair commented