From 352631099e98510eac9180ddf08de2a912555e7d Mon Sep 17 00:00:00 2001 From: Seth Shaw Date: Thu, 9 Jun 2022 12:49:35 -0700 Subject: [PATCH] paranoid checking --- src/Plugin/views/filter/NodeHasMediaUse.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/Plugin/views/filter/NodeHasMediaUse.php b/src/Plugin/views/filter/NodeHasMediaUse.php index a13bdad4..e17cdf3a 100644 --- a/src/Plugin/views/filter/NodeHasMediaUse.php +++ b/src/Plugin/views/filter/NodeHasMediaUse.php @@ -71,7 +71,8 @@ class NodeHasMediaUse extends FilterPluginBase { public function adminSummary() { $operator = ($this->options['negated']) ? "does not have" : "has"; $term = \Drupal::service('islandora.utils')->getTermForUri($this->options['use_uri']); - return "Node {$operator} a '{$term->label()}' media"; + $label = (empty($term)) ? 'BROKEN TERM URI' : $term->label(); + return "Node {$operator} a '{$label}' media"; } /**