From 7941c0db85e3f6c7df052ffba449bf8907213114 Mon Sep 17 00:00:00 2001 From: Alexandre Dias Date: Wed, 10 Apr 2024 18:30:53 +0100 Subject: [PATCH] Fix for PelIllegalFormatException: Unknown format: 0x0. --- src/PelFormat.php | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/src/PelFormat.php b/src/PelFormat.php index 9ec3f9a8..f257ba6b 100644 --- a/src/PelFormat.php +++ b/src/PelFormat.php @@ -46,6 +46,13 @@ class PelFormat { + /** + * ERROR Handling + * FIX Unknown format: 0x0 + * @author Agamemnon Katradis https://github.com/agaktr/ + */ + const ERROR = 0; + /** * Unsigned byte. * @@ -175,7 +182,8 @@ class PelFormat self::SRATIONAL => 'SRational', self::FLOAT => 'Float', self::DOUBLE => 'Double', - self::UNDEFINED => 'Undefined' + self::UNDEFINED => 'Undefined', + self::ERROR => 'ERROR' ]; protected static $formatLength = [ @@ -190,7 +198,8 @@ class PelFormat self::SRATIONAL => 8, self::FLOAT => 4, self::DOUBLE => 8, - self::UNDEFINED => 1 + self::UNDEFINED => 1, + self::ERROR => 0, ]; /**