From: Roland Häder Date: Fri, 4 Dec 2020 06:39:32 +0000 (+0100) Subject: Continued: X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=a0f090cd1474ae446e0a480e22738cfa7b48412f;p=core.git Continued: - shouldn't the header array being set after it has been hex-decoded? Signed-off-by: Roland Häder --- 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__)); }