From f40bcdcb63cb7aa74f5d75c50a5316810944b8eb Mon Sep 17 00:00:00 2001 From: Roland Haeder Date: Sat, 24 May 2014 13:34:17 +0200 Subject: [PATCH] No iterator call here + added assertion. MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Signed-off-by: Roland Häder --- inc/classes/main/class_BaseFrameworkSystem.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/inc/classes/main/class_BaseFrameworkSystem.php b/inc/classes/main/class_BaseFrameworkSystem.php index f9b63b4f..214f2a9f 100644 --- a/inc/classes/main/class_BaseFrameworkSystem.php +++ b/inc/classes/main/class_BaseFrameworkSystem.php @@ -3068,8 +3068,11 @@ class BaseFrameworkSystem extends stdClass implements FrameworkInterface { protected function isFileInitialized () { //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput(sprintf('[%s:%d:] CALLED!', __METHOD__, __LINE__)); + // size() must be callable + assert(is_callable(array($this, 'size'))); + // Get it from iterator which holds the pointer instance. If FALSE is returned - $fileSize = $this->getIteratorInstance()->size(); + $fileSize = $this->size(); //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput(sprintf('[%s:%d:] fileSize=%s', __METHOD__, __LINE__, $fileSize)); /* -- 2.39.2