Removed fclose() call from File::__destruct()
authorAlexander Ebert <ebert@woltlab.com>
Fri, 18 May 2012 11:31:04 +0000 (13:31 +0200)
committerAlexander Ebert <ebert@woltlab.com>
Fri, 18 May 2012 11:31:04 +0000 (13:31 +0200)
This call is causing PHP to throw an exception within the destructor, leading to the beloved 'Exception thrown in Unknown' and finally breaking setup.

wcfsetup/install/files/lib/system/io/File.class.php

index 25c0f46462556a1825d3c15565ca25746084a162..329ee554cbfd9d4a4fe641ca8115f4d3b4e54369 100644 (file)
@@ -57,15 +57,6 @@ class File {
                }
        }
        
-       /**
-        * Closes the file descriptor.
-        */
-       public function __destruct() {
-               if (is_resource($this->resource)) {
-                       fclose($this->resource);
-               }
-       }
-       
        /**
         * Calls the specified function on the open file.
         * Do not call this function directly. Use $file->write('') instead.