diff --git a/modules/custom/dkan_data/src/ValueReferencer.php b/modules/custom/dkan_data/src/ValueReferencer.php index 44dd8ea7e..cad265791 100644 --- a/modules/custom/dkan_data/src/ValueReferencer.php +++ b/modules/custom/dkan_data/src/ValueReferencer.php @@ -282,9 +282,18 @@ protected function dereferenceProperty(string $property_id, $data) { if (is_array($data)) { return $this->dereferenceMultiple($property_id, $data); } - else { + elseif (is_string($data)) { return $this->dereferenceSingle($property_id, $data); } + else { + Drupal::logger('value_referencer')->error( + 'Unexpected data type when dereferencing property_id @property_id with data "@data"', + [ + '@property_id' => property_id, + '@$data' => var_export($data, TRUE), + ] + ); + } } /**