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 f9b63b4..214f2a9 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));
 
                /*