From 328bbb71e1a68e59fad267bf915f4e42068523c9 Mon Sep 17 00:00:00 2001 From: Roland Haeder Date: Thu, 15 May 2014 21:23:04 +0200 Subject: [PATCH] Fixed calling ObjectFactory::createObjectByConfiguredName() as 2nd parameter must be an array. MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Signed-off-by: Roland Häder --- inc/classes/main/console/class_ConsoleTools.php | 2 +- inc/classes/main/file_stack/class_BaseFileStack.php | 4 ++-- inc/classes/main/io/io_handler/class_FileIoStream.php | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/inc/classes/main/console/class_ConsoleTools.php b/inc/classes/main/console/class_ConsoleTools.php index 32746b47..068bbf50 100644 --- a/inc/classes/main/console/class_ConsoleTools.php +++ b/inc/classes/main/console/class_ConsoleTools.php @@ -207,7 +207,7 @@ class ConsoleTools extends BaseFrameworkSystem { try { // Get a file pointer - $fileInstance = ObjectFactory::createObjectByConfiguredName('file_raw_input_class', $helperInstance->getConfigInstance()->getConfigEntry('hostname_file')); + $fileInstance = ObjectFactory::createObjectByConfiguredName('file_raw_input_class', array($helperInstance->getConfigInstance()->getConfigEntry('hostname_file'))); // Read the file $rawData = trim($fileInstance->readFromFile()); diff --git a/inc/classes/main/file_stack/class_BaseFileStack.php b/inc/classes/main/file_stack/class_BaseFileStack.php index f782ad10..d53d1e3b 100644 --- a/inc/classes/main/file_stack/class_BaseFileStack.php +++ b/inc/classes/main/file_stack/class_BaseFileStack.php @@ -41,10 +41,10 @@ class BaseFileStack extends BaseFrameworkSystem { */ protected function initStack ($fileName) { // Get a file i/o pointer instance - $pointerInstance = ObjectFactory::createObjectByConfiguredName('file_raw_input_output_class', $fileName); + $pointerInstance = ObjectFactory::createObjectByConfiguredName('file_raw_input_output_class', array($fileName)); // Get iterator instance - $iteratorInstance = ObjectFactory::createObjectByConfiguredName('file_io_iterator_class', $pointerInstance); + $iteratorInstance = ObjectFactory::createObjectByConfiguredName('file_io_iterator_class', array($pointerInstance)); // Is the instance implementing the right interface? assert($iteratorInstance instanceof SeekableFileIterator); diff --git a/inc/classes/main/io/io_handler/class_FileIoStream.php b/inc/classes/main/io/io_handler/class_FileIoStream.php index d8cd5803..35bc0c8b 100644 --- a/inc/classes/main/io/io_handler/class_FileIoStream.php +++ b/inc/classes/main/io/io_handler/class_FileIoStream.php @@ -79,7 +79,7 @@ class FileIoStream extends BaseFrameworkSystem implements FileInputStreamer, Fil for ($idx = 0; $idx < 5; $idx++) { // Get a file output pointer try { - $fileInstance = ObjectFactory::createObjectByConfiguredName('file_raw_output_class', $fileName); + $fileInstance = ObjectFactory::createObjectByConfiguredName('file_raw_output_class', array($fileName)); } catch (FileIoException $e) { // Create missing directory $dirName = dirname($fileName); @@ -147,7 +147,7 @@ class FileIoStream extends BaseFrameworkSystem implements FileInputStreamer, Fil $readData = ''; // This will contain our read data // Get a file input handler - $fileInstance = ObjectFactory::createObjectByConfiguredName('file_raw_input_class', $fqfn); + $fileInstance = ObjectFactory::createObjectByConfiguredName('file_raw_input_class', array($fqfn)); // Read all it's contents (we very and transparently decompress it below) while ($readRawLine = $fileInstance->readFromFile()) { -- 2.30.2