mirror of
https://github.com/lkddi/nexusphp.git
synced 2026-04-24 12:07:23 +08:00
修复种子页面评论引用用户不存在时报错问题
This commit is contained in:
+2
-2
@@ -117,10 +117,10 @@ if ($action == "add")
|
|||||||
$commentid = intval($_GET["cid"] ?? 0);
|
$commentid = intval($_GET["cid"] ?? 0);
|
||||||
int_check($commentid,true);
|
int_check($commentid,true);
|
||||||
|
|
||||||
$res2 = sql_query("SELECT comments.text, users.username FROM comments JOIN users ON comments.user = users.id WHERE comments.id=$commentid") or sqlerr(__FILE__, __LINE__);
|
$res2 = sql_query("SELECT comments.text, users.username FROM comments LEFT JOIN users ON comments.user = users.id WHERE comments.id=$commentid") or sqlerr(__FILE__, __LINE__);
|
||||||
|
|
||||||
if (mysql_num_rows($res2) != 1)
|
if (mysql_num_rows($res2) != 1)
|
||||||
stderr($lang_forums['std_error'], $lang_forums['std_no_comment_id']);
|
stderr($lang_comment['std_error'], $lang_comment['std_no_comment_id']);
|
||||||
|
|
||||||
$arr2 = mysql_fetch_assoc($res2);
|
$arr2 = mysql_fetch_assoc($res2);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -7,6 +7,7 @@ return [
|
|||||||
'user_not_exists' => '(orphaned)',
|
'user_not_exists' => '(orphaned)',
|
||||||
'time_units' => [
|
'time_units' => [
|
||||||
'week' => 'weeks',
|
'week' => 'weeks',
|
||||||
|
'hour' => 'hours',
|
||||||
],
|
],
|
||||||
'select_all' => 'Select all',
|
'select_all' => 'Select all',
|
||||||
'unselect_all' => 'Unselect all',
|
'unselect_all' => 'Unselect all',
|
||||||
|
|||||||
@@ -7,6 +7,7 @@ return [
|
|||||||
'user_not_exists' => '(無此帳戶)',
|
'user_not_exists' => '(無此帳戶)',
|
||||||
'time_units' => [
|
'time_units' => [
|
||||||
'week' => '周',
|
'week' => '周',
|
||||||
|
'hour' => '小時',
|
||||||
],
|
],
|
||||||
'select_all' => '全選',
|
'select_all' => '全選',
|
||||||
'unselect_all' => '全不選',
|
'unselect_all' => '全不選',
|
||||||
|
|||||||
Reference in New Issue
Block a user