Skip to content

Commit 10b0b7f

Browse files
simonLeary42Copilot
andcommitted
Update resources/lib/UnitySite.php
Co-authored-by: Copilot <[email protected]>
1 parent 6894b41 commit 10b0b7f

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

resources/lib/UnitySite.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -156,6 +156,9 @@ public static function getUploadedFileContents($filename, $do_delete_tmpfile_aft
156156
self::badRequest(strval($e));
157157
}
158158
$contents = file_get_contents($tmpfile_path);
159+
if ($contents === false) {
160+
self::badRequest("Failed to read uploaded file: " . $tmpfile_path);
161+
}
159162
if ($do_delete_tmpfile_after_read) {
160163
unlink($tmpfile_path);
161164
}

0 commit comments

Comments
 (0)