]> git.mxchange.org Git - core.git/commitdiff
Continued:
authorRoland Häder <roland@mxchange.org>
Fri, 17 Feb 2023 20:06:03 +0000 (21:06 +0100)
committerRoland Häder <roland@mxchange.org>
Fri, 17 Feb 2023 20:06:03 +0000 (21:06 +0100)
- arrays can be serialized and stored in files (ops)
- added debug line

framework/main/classes/file_directories/binary/stack/class_StackFile.php
framework/main/classes/stacker/file/class_BaseFileStack.php

index 5d3f4c94e82367bed8c8c294c35ae99ff309298b..460d236ef3cf2f0f982b0c5707a97e4922113476 100644 (file)
@@ -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)));
                }
index 4eb594316daa753a95cb3421e1657c90873620ee..c36b1e96c46e9a9d26d2286bd03ca00cdf125800 100644 (file)
@@ -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