From 3db814c3a3c5dd7d46d180a67f3f6598a430d04e Mon Sep 17 00:00:00 2001 From: Beatrycze Volk Date: Fri, 31 May 2024 16:07:03 +0200 Subject: [PATCH] [BUGFIX] Correctly check if `storagePid` key exists in array (#1241) --- Classes/Common/AbstractDocument.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Classes/Common/AbstractDocument.php b/Classes/Common/AbstractDocument.php index 0f3d280f6..42901fc8e 100644 --- a/Classes/Common/AbstractDocument.php +++ b/Classes/Common/AbstractDocument.php @@ -574,7 +574,7 @@ public static function &getInstance(string $location, array $settings = [], bool } // Sanitize input. - $pid = $settings['storagePid'] ? max((int) $settings['storagePid'], 0) : 0; + $pid = array_key_exists('storagePid', $settings) ? max((int) $settings['storagePid'], 0) : 0; if ($documentFormat == 'METS') { $instance = new MetsDocument($pid, $location, $xml, $settings); } elseif ($documentFormat == 'IIIF') {