Skip to content
This repository has been archived by the owner on Nov 2, 2020. It is now read-only.

Commit

Permalink
fix(TorrentUpload): Fix length 0 file cause ParseErrorException
Browse files Browse the repository at this point in the history
Signed-off-by: Rhilip <rhilipruan@gmail.com>
  • Loading branch information
Rhilip committed Jun 9, 2019
1 parent 5e5634e commit e580577
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion apps/models/form/TorrentUploadForm.php
Original file line number Diff line number Diff line change
Expand Up @@ -293,7 +293,7 @@ private function checkTorrentDict($dict, $key, $type = null)
if (!is_array($dict)) throw new ParseErrorException("std_not_a_dictionary");

$value = $dict[$key];
if (!$value) throw new ParseErrorException("std_dictionary_is_missing_key");
if (!isset($value)) throw new ParseErrorException("std_dictionary_is_missing_key");

if (!is_null($type)) {
$isFunction = 'is_' . $type;
Expand Down

0 comments on commit e580577

Please sign in to comment.