Skip to content
Snippets Groups Projects
Commit 7a02ca16 authored by Juha Luoma's avatar Juha Luoma Committed by Robert Lange
Browse files

Check that subfield exists

parent b43f176e
No related merge requests found
......@@ -916,8 +916,10 @@ trait MarcAdvancedTrait
$fields024 = $this->getMarcRecord()->getFields('024');
$ismn = null;
foreach ($fields024 as $field) {
if ($field->getIndicator(1) == 2) {
$ismn = $field->getSubfield('a')->getData();
if ($field->getIndicator(1) == 2
&& $subfield = $field->getSubfield('a')
) {
$ismn = $subfield->getData();
break;
}
}
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment