Rewritten:
[core.git] / framework / main / classes / images / class_BaseImage.php
index a42c6c1..f2e3433 100644 (file)
@@ -555,10 +555,16 @@ class BaseImage extends BaseFrameworkSystem implements Registerable {
         */
        public function getContent () {
                // Get cache file name
-               $cacheFile = $this->getTemplateInstance()->getImageCacheFqfn();
+               $cacheFile = $this->getTemplateInstance()->getImageCacheFile();
+
+               // Open it for reading
+               $fileObject = $cacheFile->openFile('r');
+
+               // Rewind to beginning
+               $fileObject->rewind();
 
                // Load the content
-               $imageContent = file_get_contents($cacheFile);
+               $imageContent = $fileObject->fread($cacheFile->getSize());
 
                // And return it
                return $imageContent;