No iterator call here + added assertion.
authorRoland Haeder <roland@mxchange.org>
Sat, 24 May 2014 11:34:17 +0000 (13:34 +0200)
committerRoland Haeder <roland@mxchange.org>
Sat, 24 May 2014 11:34:17 +0000 (13:34 +0200)
Signed-off-by: Roland Häder <roland@mxchange.org>
inc/classes/main/class_BaseFrameworkSystem.php

index f9b63b4ff2df46d80e95f12f4f3776dc2132c504..214f2a9f68be77cbdb664148c6109567daa9f68e 100644 (file)
@@ -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));
 
                /*