Fix PHP Notice: Undefined index: field_farm_quantity_label in farm_theme_preprocess_field().

This commit is contained in:
Michael Stenta 2020-05-13 12:11:39 -04:00
parent 8c5d7c8ac3
commit fb22a6057d
1 changed files with 1 additions and 1 deletions

View File

@ -601,7 +601,7 @@ function farm_theme_preprocess_field(&$vars) {
// Populate the values that are not empty.
foreach ($qty as $key => &$value) {
if ($values['field_farm_quantity_' . $key][0]['#markup'] != '') {
if (isset($values['field_farm_quantity_' . $key][0]['#markup']) && $values['field_farm_quantity_' . $key][0]['#markup'] != '') {
$value = $values['field_farm_quantity_' . $key][0]['#markup'];
}
}