Skip to content

Commit

Permalink
paranoid checking
Browse files Browse the repository at this point in the history
  • Loading branch information
seth-shaw-unlv committed Jun 9, 2022
1 parent f6a66fe commit 3526310
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/Plugin/views/filter/NodeHasMediaUse.php
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,8 @@ protected function valueForm(&$form, FormStateInterface $form_state) {
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";
}

/**
Expand Down

0 comments on commit 3526310

Please sign in to comment.