Handle null file handles in UIDGenerator::_destruct()
authorAaron Schulz <aschulz@wikimedia.org>
Mon, 7 Apr 2014 23:07:55 +0000 (16:07 -0700)
committerAaron Schulz <aschulz@wikimedia.org>
Tue, 8 Apr 2014 16:13:44 +0000 (16:13 +0000)
Change-Id: I92f874e610b2ea32d34aeb35ddd4069fe0d721fc

includes/utils/UIDGenerator.php

index 0eac06e..c7bb4f3 100644 (file)
@@ -500,6 +500,6 @@ class UIDGenerator {
        }
 
        function __destruct() {
-               array_map( 'fclose', $this->fileHandles );
+               array_map( 'fclose', array_filter( $this->fileHandles ) );
        }
 }