function isLogCanComment($blogId) {
if (Option::get('iscomment') == 'n') {
return false;
}
$query = $this->db->query("SELECT allow_remark FROM ".DB_PREFIX."blog WHERE gid=$blogId");
$show_remark = $this->db->fetch_array($query);
if ($show_remark['allow_remark'] == 'n' || $show_remark === false) {
return false;
}else {
return true;
}
}
if ($show_remark['allow_remark'] == 'n' || $show_remark === false) {
改成
if ($show_remark['allow_remark'] == 'n' || $show_remark == false) {
或者
if ($show_remark['allow_remark'] == 'n' || $show_remark === NULL) {
相关阅读
留言咨询