Three times in the geocoder_field.module file array_filter is used along with the option ARRAY_FILTER_USE_BOTH. However, this option is only available as of PHP 5.6 (see the array_filter docs on php.net). The option passes both the array value and the associated key to the callback function, but the key is never used by the functions in this file. Because PHP 5.6 is only available on 11-20% of servers (stats from w3techs.com and wordpress.org), this option flag should probably be removed. On PHP versions below 5.6, it results in the following errors:

Notice: Use of undefined constant ARRAY_FILTER_USE_BOTH - assumed 'ARRAY_FILTER_USE_BOTH' in geocoder_field_widget_get_field_value() (line 330 of /home/emergencyleash/public_html/sites/emergencyleash.com/modules/geocoder/modules/geocoder_field/geocoder_field.module).
Warning: array_filter() expects at most 2 parameters, 3 given in geocoder_field_widget_get_field_value() (line 330 of /home/emergencyleash/public_html/sites/emergencyleash.com/modules/geocoder/modules/geocoder_field/geocoder_field.module).
Warning: uasort() expects parameter 1 to be array, null given in geocoder_field_widget_get_field_value() (line 345 of /home/emergencyleash/public_html/sites/emergencyleash.com/modules/geocoder/modules/geocoder_field/geocoder_field.module).
Warning: array_keys() expects parameter 1 to be array, null given in geocoder_field_widget_get_field_value() (line 346 of /home/emergencyleash/public_html/sites/emergencyleash.com/modules/geocoder/modules/geocoder_field/geocoder_field.module).
No plugin could geocode: "100 Main St New York, NY 10001 US".
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

thirdender created an issue. See original summary.

thirdender’s picture

  • Pol committed 6748090 on 7.x-2.x authored by thirdender
    Issue #2758983 by thirdender: Use of undefined constant...
Pol’s picture

Status: Active » Fixed

Thanks.

Status: Fixed » Closed (fixed)

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