Skip to content

Commit

Permalink
[BUGFIX] Fix reading storagePid from settings array (#1238)
Browse files Browse the repository at this point in the history
Co-authored-by: Sebastian Meyer <[email protected]>
  • Loading branch information
beatrycze-volk and sebastian-meyer committed May 31, 2024
1 parent a9df0c7 commit fd1328e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Classes/Common/AbstractDocument.php
Original file line number Diff line number Diff line change
Expand Up @@ -574,7 +574,7 @@ public static function &getInstance(string $location, array $settings = [], bool
}

// Sanitize input.
$pid = max((int) $settings['storagePid'], 0);
$pid = $settings['storagePid'] ? max((int) $settings['storagePid'], 0) : 0;
if ($documentFormat == 'METS') {
$instance = new MetsDocument($pid, $location, $xml, $settings);
} elseif ($documentFormat == 'IIIF') {
Expand Down

0 comments on commit fd1328e

Please sign in to comment.