From a0f090cd1474ae446e0a480e22738cfa7b48412f Mon Sep 17 00:00:00 2001 From: =?utf8?q?Roland=20H=C3=A4der?= Date: Fri, 4 Dec 2020 07:39:32 +0100 Subject: [PATCH] Continued: - shouldn't the header array being set after it has been hex-decoded? MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Signed-off-by: Roland Häder --- framework/main/classes/stacker/file/class_BaseFileStack.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/framework/main/classes/stacker/file/class_BaseFileStack.php b/framework/main/classes/stacker/file/class_BaseFileStack.php index 7ea25c11..7bf00c4f 100644 --- a/framework/main/classes/stacker/file/class_BaseFileStack.php +++ b/framework/main/classes/stacker/file/class_BaseFileStack.php @@ -154,9 +154,6 @@ abstract class BaseFileStack extends BaseStacker { */ $header = explode(chr(BaseBinaryFile::SEPARATOR_HEADER_DATA), $data); - // Set header here - $this->getIteratorInstance()->setHeader($header); - // Check if the array has only 3 elements /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(sprintf('BASE-FILE-STACK: header(%d)=%s', count($header), print_r($header, true))); if (count($header) != 3) { @@ -191,6 +188,9 @@ abstract class BaseFileStack extends BaseStacker { $header[1] = hex2bin($header[1]); $header[2] = hex2bin($header[2]); + // Set header here + $this->getIteratorInstance()->setHeader($header); + // Trace message /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(sprintf('BASE-FILE-STACK: EXIT!', __METHOD__, __LINE__)); } -- 2.39.5