Skip to content

Commit

Permalink
Test existance of Array Index in setSpec
Browse files Browse the repository at this point in the history
  • Loading branch information
ipf authored Jan 20, 2021
1 parent a68bade commit 19c215d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Service/OaiService.php
Original file line number Diff line number Diff line change
Expand Up @@ -591,7 +591,7 @@ private function getRecords(array &$arr): array
}
}
}
if (isset($arr['set']) && !in_array($arr['set'], $arrResult['header'][$i]['setSpec']) && isset($arrResult['header'][$i]['setSpec'])) {
if (array_key_exists('setSpec', $arrResult['header'][$i]) && isset($arr['set']) && !in_array($arr['set'], $arrResult['header'][$i]['setSpec']) && isset($arrResult['header'][$i]['setSpec'])) {
array_unshift($arrResult['header'][$i]['setSpec'], $arr['set']);
}
if (isset($arrResult['header'][$i]['setSpec'])) {
Expand Down

0 comments on commit 19c215d

Please sign in to comment.