Skip to content

Commit cf21ea4

Browse files
hosusanagovcoywarnier
authored andcommitted
Internal: Fix fclose() call to avoid undetected error
1 parent 358089b commit cf21ea4

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

main/admin/user_import.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,8 +50,10 @@ function createDirectory(?string $path = null): ?string
5050
$fp = fopen($data.'/.htaccess', 'w');
5151
if ($fp) {
5252
fwrite($fp, $block);
53+
fclose($fp);
54+
} else {
55+
error_log("Failed to open .htaccess file in $data for writing.");
5356
}
54-
fclose($fp);
5557
}
5658
}
5759
}

0 commit comments

Comments
 (0)