广杰博客

  • 首页
  • IT资讯
  • IT运维
  1. 首页
  2. IT运维
  3. 正文

discuz删除主题出现错误

04/01/2011 1219点热度 0人点赞 0条评论

在discuz论坛中删除主题出现一下错误:
Warning: implode(): Bad arguments. in e:\web\include\post.func.php on line 342

Discuz! info: MySQL Query Error

User: admin
Time: 2008-1-24 10:41pm
Script: /topicadmin.php

SQL: Update cdb_members SET Where uid = 37
Error: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'Where uid = 37' at line 1
Errno.: 1064

Similar error report has beed dispatched to administrator before.
当论坛积分设置当中和板块设置当中对于上传附件没有设置积分策略的时候,版主删除含有附件的帖子可能
会出现程序错误。
解决方法,手工修改:
打开, include/post.func.php 查找:

function updateattachcredits($operator, $uidarray, $creditsarray) {
global $db, $tablepre, $discuz_uid;
$creditsadd1 = '';
if(is_array($creditsarray)) {
foreach($creditsarray as $id => $addcredits) {
$creditsadd1[] = "extcredits$id=extcredits$id$operator$addcredits*\$attachs";
}
}
$creditsadd1 = implode(', ', $creditsadd1);
foreach($uidarray as $uid => $attachs) {
eval("\$creditsadd2 = \"$creditsadd1\";");
$db->query("Update {$tablepre}members SET $creditsadd2 Where uid = $uid", 'UNBUFFERED');
}
}

将上述代码替换为

function updateattachcredits($operator, $uidarray, $creditsarray) {
global $db, $tablepre, $discuz_uid;
$creditsadd1 = array();
if(is_array($creditsarray)) {
foreach($creditsarray as $id => $addcredits) {
$creditsadd1[] = "extcredits$id=extcredits$id$operator$addcredits*\$attachs";
}
}

if(empty($creditsadd1)) return;

$creditsadd1 = implode(', ', $creditsadd1);
foreach($uidarray as $uid => $attachs) {
eval("\$creditsadd2 = \"$creditsadd1\";");
$db->query("Update {$tablepre}members SET $creditsadd2 Where uid = $uid", 'UNBUFFERED');
}
}

标签: 暂无
最后更新:01/01/1970

guangjie

这个人很懒,什么都没留下

点赞
下一篇 >

文章评论

您需要 登录 之后才可以评论
最新 热点 随机
最新 热点 随机
Red Hat Enterprise Linux 9 发布,大量组件升级 windows10 家庭版添加hyper-v虚拟机组件 Red Hat Enterprise Linux 8.5 GA 发布 Rocky Linux 8.4 GA正式版发布下载 Rocky Linux 8.3 首个候选版本发布 CentOS 8.3 (2011) ISO镜像下载发布 CentOS Linux 落幕 CentOS Stream 上位 CentOS Linux 7.9 (2009) iso镜像下载 Windows 10 2020年10月更新ISO下载 ubuntu ssh通过密钥登陆服务器
CentOS常用到的查看系统命令 网页播放音乐代码全收集 2011年最佳10款Linux发行版 Tomcat配置多站点虚拟主机 iis配置https服务,支持ssl加密通信 live messenger9.0在win7任务栏右下角显示 U盘病毒tel.xls.exe分析解决 安装android虚拟机,体验android系统智能手机上网 springboot nginx https 配置 sshfs挂载共享远程目录
标签聚合
linux redhat android Hyper-V springboot php_curl Windows Server 2012 nginx
友情链接
  • linux运维
  • 郑州SEO

COPYRIGHT © 2021 gjie.cn. ALL RIGHTS RESERVED.

Theme Kratos Made By Seaton Jiang

豫ICP备07002435号-8