From: Roland Häder Date: Fri, 17 Feb 2023 20:06:03 +0000 (+0100) Subject: Continued: X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=85fe3f2476cfda01bedb9240efe5784792d78d60;p=core.git Continued: - arrays can be serialized and stored in files (ops) - added debug line --- diff --git a/framework/main/classes/file_directories/binary/stack/class_StackFile.php b/framework/main/classes/file_directories/binary/stack/class_StackFile.php index 5d3f4c94..460d236e 100644 --- a/framework/main/classes/file_directories/binary/stack/class_StackFile.php +++ b/framework/main/classes/file_directories/binary/stack/class_StackFile.php @@ -208,7 +208,7 @@ class StackFile extends BaseBinaryFile implements FileStacker { if (empty($stackName)) { // Throw IAE throw new InvalidArgumentException('Parameter "stackName" is empty', FrameworkInterface::EXCEPTION_INVALID_ARGUMENT); - } elseif (is_array($value) || is_object($value) || is_resource($value)) { + } elseif (is_object($value) || is_resource($value)) { // Not wanted here throw new InvalidArgumentException(sprintf('value[]=%s is not stackable in files', gettype($value))); } diff --git a/framework/main/classes/stacker/file/class_BaseFileStack.php b/framework/main/classes/stacker/file/class_BaseFileStack.php index 4eb59431..c36b1e96 100644 --- a/framework/main/classes/stacker/file/class_BaseFileStack.php +++ b/framework/main/classes/stacker/file/class_BaseFileStack.php @@ -332,6 +332,7 @@ abstract class BaseFileStack extends BaseStacker { * Now add the value to the file stack which returns gap position, a * hash and length of the raw data. */ + /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(sprintf('BASE-FILE-STACK: Invoking this->iteratorInstance->binaryFileInstance->writeValueToFile(%s,value[]=%s) ...', $stackerName, gettype($value))); $data = $this->getIteratorInstance()->getBinaryFileInstance()->writeValueToFile($stackerName, $value); // Add the hash and gap position to the index