From: Roland Haeder Date: Sat, 24 May 2014 11:34:17 +0000 (+0200) Subject: No iterator call here + added assertion. X-Git-Url: https://git.mxchange.org/?p=core.git;a=commitdiff_plain;h=f40bcdcb63cb7aa74f5d75c50a5316810944b8eb No iterator call here + added assertion. Signed-off-by: Roland Häder --- 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)); /*