From 502969341d7f03eb4d3e04fef9964534a786c63a Mon Sep 17 00:00:00 2001 From: Alexander Ebert Date: Fri, 18 May 2012 13:31:04 +0200 Subject: [PATCH] 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. --- wcfsetup/install/files/lib/system/io/File.class.php | 9 --------- 1 file changed, 9 deletions(-) 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. -- 2.20.1