Skip to content

Commit

Permalink
[FINNA-1243] Fix call to undefined method + define array
Browse files Browse the repository at this point in the history
  • Loading branch information
tmikkonen committed Apr 4, 2024
1 parent a4da6f6 commit 2bf7965
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@

namespace Finna\RecordDriver\Feature;

use VuFind\Marc\MarcReader;
use VuFind\RecordDriver\Feature\VersionAwareInterface;
use VuFindSearch\Command\RetrieveCommand;
use VuFindSearch\Command\SearchCommand;
Expand Down Expand Up @@ -587,6 +588,7 @@ public function getOriginalLanguages()
if (!empty($languages)) {
foreach ($this->getMarcReader()->getFields('041') as $field) {
if ($field['i1'] != 0) {
$sortingArr = [];
foreach ($this->getLanguages() as $lang) {
$sortingArr[] = $lang;
}
Expand All @@ -599,7 +601,7 @@ public function getOriginalLanguages()
$result = [];
}
if (!isset($result)) {
$result = $languages;
$result = $languages;
}
return $result;
}
Expand Down

0 comments on commit 2bf7965

Please sign in to comment.