Skip to content

Commit

Permalink
fix(上传种子): 修复种子中存在0长度文件时出现的「目录缺少值」错误
Browse files Browse the repository at this point in the history
  • Loading branch information
tongyifan committed Aug 11, 2019
1 parent 03da980 commit 93c0649
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion takeupload.php
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ function checkTorrentDict($dict, $key, $type = null)

if (!is_array($dict)) bark($lang_takeupload['std_not_a_dictionary']);
$value = $dict[$key];
if (!$value) bark($lang_takeupload['std_dictionary_is_missing_key']);
if (!$value && $value !== 0) bark($lang_takeupload['std_dictionary_is_missing_key']);
if (!is_null($type)) {
$isFunction = 'is_' . $type;
if (function_exists($isFunction) && !$isFunction($value)) {
Expand Down
2 changes: 1 addition & 1 deletion takeuploadoffer.php
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ function checkTorrentDict($dict, $key, $type = null)

if (!is_array($dict)) bark($lang_takeupload['std_not_a_dictionary']);
$value = $dict[$key];
if (!$value) bark($lang_takeupload['std_dictionary_is_missing_key']);
if (!$value && $value !== 0) bark($lang_takeupload['std_dictionary_is_missing_key']);
if (!is_null($type)) {
$isFunction = 'is_' . $type;
if (function_exists($isFunction) && !$isFunction($value)) {
Expand Down

0 comments on commit 93c0649

Please sign in to comment.