backdrop-contrib / ip_geoloc

IP Geolocation Views & Maps for Backdrop CMS.
GNU General Public License v2.0
0 stars 2 forks source link

PHP 7.4 parenthesis missing notice #6

Closed pgrayove-mcpl closed 1 year ago

pgrayove-mcpl commented 1 year ago

Deprecated: Unparenthesizeda ? b : c ? d : eis deprecated. Use either(a ? b : c) ? d : eora ? b : (c ? d : e)in /app/modules/contrib/ip_geoloc/views/ip_geoloc_plugin_style.inc on line 469

Looks like it can be updated from this Drupal patch

In /views/ip_geoloc_plugin_style.inc

Change line 469: $items[0] = empty($differentiator_value) ? array() : is_array($differentiator_value) ? $differentiator_value : array($differentiator_value);

to: $items[0] = empty($differentiator_value) ? array() : (is_array($differentiator_value) ? $differentiator_value : array($differentiator_value));

laryn commented 1 year ago

Looks great @pgrayove-mcpl -- can you submit as a PR?

laryn commented 1 year ago

Oh, I just saw https://github.com/backdrop-contrib/ip_geoloc/pull/7

Note that if you put "Fixes #x" at the top of the first comment in a PR it will link it to the issue automatically.