From 32b0bb8b6824f1fda3ebe43ba8a297dff532f59e Mon Sep 17 00:00:00 2001 From: Sergio Mendolia Date: Sat, 7 Dec 2024 05:50:47 +0100 Subject: [PATCH] Prevent counting on null --- src/Formats/Mobi/Parser/MobiParser.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Formats/Mobi/Parser/MobiParser.php b/src/Formats/Mobi/Parser/MobiParser.php index 13bd959..bb0eadd 100644 --- a/src/Formats/Mobi/Parser/MobiParser.php +++ b/src/Formats/Mobi/Parser/MobiParser.php @@ -43,7 +43,7 @@ public function get(int $record, bool $asArray = false): array|string|null { $data = $this->getRecordData($record); - if ($asArray) { + if ($asArray || $data === null) { return $data; }