Fixed parser error.
[core.git] / inc / classes / main / file_directories / io_stream / class_FileIoStream.php
index a7470073fdd3c4679af4471c7036e508120ec08d..f51884fd04f9a6244c736004e3b130ca3eb9eb98 100644 (file)
@@ -83,14 +83,8 @@ class FileIoStream extends BaseFrameworkSystem implements FileInputStreamer, Fil
                        try {
                                $fileInstance = ObjectFactory::createObjectByConfiguredName('file_raw_output_class', array($fileName, 'wb'));
                        } catch (FileIoException $e) {
-                               // Create missing directory
-                               $dirName = dirname($fileName);
-                               for ($idx2 = 0; $idx2 < (2 - $idx); $idx2++) {
-                                       $dirName = dirname($dirName);
-                               } // END - for
-
-                               // Try to create it
-                               @mkdir($dirName);
+                               // Bail out
+                               ApplicationEntryPoint::app_exit('The application has made a fatal error. Exception: ' . $e->__toString() . ' with message: ' . $e->getMessage());
                        }
                } // END - for
 
@@ -130,7 +124,7 @@ class FileIoStream extends BaseFrameworkSystem implements FileInputStreamer, Fil
                } // END - while
 
                // Close the file
-               $fileInstance->closeFile();
+               unset($fileInstance);
        }
 
        /**
@@ -166,7 +160,7 @@ class FileIoStream extends BaseFrameworkSystem implements FileInputStreamer, Fil
                } // END - while
 
                // Close directory handle
-               $fileInstance->closeFile();
+               unset($fileInstance);
 
                // Convert it into an array
                $inputBuffer = explode(chr(10), $inputBuffer);