Fix Notice: Trying to access array offset on value of type null in farm_api_restws_request_alter()

This commit is contained in:
Michael Stenta 2020-09-16 07:27:40 -04:00
parent 7cb84aba77
commit e81c62716e
1 changed files with 1 additions and 1 deletions

View File

@ -381,7 +381,7 @@ function farm_api_restws_request_alter(array &$request) {
// eg: /log.json?log_category=Tillage
foreach ($_GET as $field_name => &$filter_value) {
$field_info = field_info_field($field_name);
if ($field_info['type'] == 'taxonomy_term_reference') {
if (!empty($field_info['type']) && $field_info['type'] == 'taxonomy_term_reference') {
if ($vocabulary = drupal_array_get_nested_value($field_info, array('settings', 'allowed_values', '0', 'vocabulary'))) {
if ($term = farm_term($filter_value, $vocabulary, FALSE)) {
$_GET[$field_name] = $term->tid;