Browse Source

Check for the parent before we getValue (#95)

pull/756/head
Jared Whiklo 6 years ago committed by dannylamb
parent
commit
eb906c93bd
  1. 9
      src/IslandoraUtils.php

9
src/IslandoraUtils.php

@ -107,10 +107,13 @@ class IslandoraUtils {
if ($field->isEmpty()) {
return NULL;
}
return $field->first()
$parent = $field->first()
->get('entity')
->getTarget()
->getValue();
->getTarget();
if (!is_null($parent)) {
return $parent->getValue();
}
return NULL;
}
/**

Loading…
Cancel
Save