diff --git a/upload/source/class/table/table_home_blog.php b/upload/source/class/table/table_home_blog.php index 3ad44c86a2056f4a6768a92ed78c615109d65556..5753ee14919b89988f6033f8d5e467438fc9ac7a 100644 --- a/upload/source/class/table/table_home_blog.php +++ b/upload/source/class/table/table_home_blog.php @@ -32,7 +32,7 @@ class table_home_blog extends discuz_table } public function range($start = 0, $limit = 0, $ordersc = 'DESC', $orderby = 'dateline', $friend = null, $status = null, $uid = null, $dateline = null) { $wheresql = '1'; - $wheresql .= $friend ? ' AND '.DB::field('friend', $friend) : ''; + $wheresql .= ($friend !== null) ? ' AND '.DB::field('friend', $friend) : ''; $wheresql .= $uid ? ' AND '.DB::field('uid', $uid) : ''; $wheresql .= $status ? ' AND '.DB::field('status', $status) : ''; $wheresql .= $dateline ? ' AND '.DB::field('dateline', $dateline, '>=') : '';