Skip to content

Commit 4d7bc4c

Browse files
committed
Prevent IOException (Cannot close non-opened file)
1 parent 515f3cc commit 4d7bc4c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/main/php/lang/ast/CompilingClassloader.class.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -155,7 +155,7 @@ public function loadClassBytes($class) {
155155
} catch (Error $e) {
156156
throw new ClassFormatException('Syntax error', $e);
157157
} finally {
158-
$file->close();
158+
$file->isOpen() && $file->close();
159159
}
160160
}
161161

0 commit comments

Comments
 (0)