Skip to content

Commit 87159a8

Browse files
committed
fail to read file is not bad request
1 parent 10b0b7f commit 87159a8

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

resources/lib/UnitySite.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -157,7 +157,7 @@ public static function getUploadedFileContents($filename, $do_delete_tmpfile_aft
157157
}
158158
$contents = file_get_contents($tmpfile_path);
159159
if ($contents === false) {
160-
self::badRequest("Failed to read uploaded file: " . $tmpfile_path);
160+
throw new \Exception("Failed to read file: " . $tmpfile_path);
161161
}
162162
if ($do_delete_tmpfile_after_read) {
163163
unlink($tmpfile_path);

0 commit comments

Comments
 (0)