From: Alexander Ebert Date: Fri, 18 May 2012 11:31:04 +0000 (+0200) Subject: Removed fclose() call from File::__destruct() X-Git-Tag: 2.0.0_Beta_1~1103 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=502969341d7f03eb4d3e04fef9964534a786c63a;p=GitHub%2FWoltLab%2FWCF.git Removed fclose() call from File::__destruct() This call is causing PHP to throw an exception within the destructor, leading to the beloved 'Exception thrown in Unknown' and finally breaking setup. --- diff --git a/wcfsetup/install/files/lib/system/io/File.class.php b/wcfsetup/install/files/lib/system/io/File.class.php index 25c0f46462..329ee554cb 100644 --- a/wcfsetup/install/files/lib/system/io/File.class.php +++ b/wcfsetup/install/files/lib/system/io/File.class.php @@ -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.