返回列表 发帖
查看: 157|回复: 3

[求助] PHP message: PHP Warning: Declaration of table_forum_post::update

3

主题

14

回帖

27

积分

初学乍练

贡献
0 点
金币
3 个
发表于 2024-3-19 13:00:01 | 显示全部楼层 |阅读模式
[error] 3573#0: *894031 FastCGI sent in stderr: "PHP message: PHP Warning:  Declaration of table_forum_post::update($tableid, $pid, $data, $unbuffered = false, $low_priority = false, $first = NULL, $invisible = NULL, $fid = NULL, $status = NULL) should be compatible with discuz_table::update($val, $data, $unbuffered = false, $low_priority = false) in /bbs/source/class/table/table_forum_post.php on line 442PHP message: PHP Warning:  Declaration of table_forum_post::delete($tableid, $pid, $unbuffered = false) should be compatible with discuz_table::delete($val, $unbuffered = false) in /bbs/source/class/table/table_forum_post.php on line 611PHP message: PHP Warning:  Declaration of table_forum_post::insert($tableid, $data, $return_insert_id = false, $replace = false, $silent = false) should be compatible with discuz_table::insert($data, $return_insert_id = false, $replace = false, $silent = false) in /bbs/source/class/table/table_forum_post.php on line 607PHP message: PHP Warning:  Declaration of table_forum_post::fetch($tableid, $pid, $outmsg = true) should be compatible with discuz_table::fetch($id, $force_from_db = false) in /bbs/source/class/table/table_forum_post.php on line 133PHP message: PHP Warning:  Declaration of table_forum_post::fetch_all($tableid, $pids, $outmsg = true) should be compatible with discuz_table::fetch_all($ids, $force_from_db = false) in /bbs/source/class/table/table_forum_post.php on line 177PHP message: PHP Warning:  Declaration of table_forum_post::update_cache($tableid, $id, $idtype, $data, $condition = Array, $glue = 'merge') should be compatible with discuz_table::update_cache($id, $data, $cache_ttl = NULL, $pre_cache_key = NULL) in /bbs/source/class/table/table_forum_post.php on line 495" while reading response header from upstream, client: 51.222.253.20, server: bbs.test.net$, request: "GET /forum.php?mod=rss&fid=71&auth=0 HTTP/1.1", u



table_forum_post::update($tableid, $pid, $data, $unbuffered = false, $low_priority = false, $first = NULL, $invisible = NULL, $fid = NULL, $status = NULL)
discuz_table::update($val, $data, $unbuffered = false, $low_priority = false)
          DB::update(self::get_tablename($tableid), $data, implode(' AND ', $where), $unbuffered, $low_priority)



    delete($tableid, $pid, $unbuffered = false)
discuz_table::delete($val, $unbuffered = false)


table_forum_post::insert($tableid, $data, $return_insert_id = false, $replace = false, $silent = false)
              discuz_table::insert($data, $return_insert_id = false, $replace = false, $silent = false)


table_forum_post::fetch($tableid, $pid, $outmsg = true)
         discuz_table::fetch($id, $force_from_db = false)


table_forum_post::fetch_all($tableid, $pids, $outmsg = true)
      discuz_table::fetch_all($ids, $force_from_db = false)




table_forum_post::update_cache($tableid, $id, $idtype, $data, $condition = Array, $glue = 'merge')
      discuz_table::update_cache($id, $data, $cache_ttl = NULL, $pre_cache_key = NULL)




discuz x3.4
php7.4.5

代码子类重写方法的参数和基类不一样报错?


我知道答案 回答被采纳将会获得1 贡献 已有3人回答
回复

使用道具 举报

8

主题

1508

回帖

2611

积分

应用开发者

贡献
178 点
金币
123 个
QQ
发表于 2024-3-19 14:38:28 | 显示全部楼层
重写定义个方法好了,  要不就保持 参数一致
专业解决各类服务器问题 和 discuz疑难杂症!
QQ 860855665 西部数码核心代理www.wensuhulian.com 飘仙建站论坛bbs.piaoxian.net
discuz互助QQ群 73131419
回复 支持 反对

使用道具 举报

3

主题

14

回帖

27

积分

初学乍练

贡献
0 点
金币
3 个
 楼主| 发表于 2024-3-19 18:00:15 | 显示全部楼层
天外飘仙 发表于 2024-3-19 14:38
重写定义个方法好了,  要不就保持 参数一致

保持 参数一致?
不会影响后面的代码?
回复 支持 反对

使用道具 举报

8

主题

1508

回帖

2611

积分

应用开发者

贡献
178 点
金币
123 个
QQ
发表于 2024-3-19 20:32:23 | 显示全部楼层
aabababba 发表于 2024-3-19 18:00
保持 参数一致?
不会影响后面的代码?

形参 不是必须使用的哦,

你不用就是了
专业解决各类服务器问题 和 discuz疑难杂症!
QQ 860855665 西部数码核心代理www.wensuhulian.com 飘仙建站论坛bbs.piaoxian.net
discuz互助QQ群 73131419
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

  • 关注公众号
  • 有偿服务微信
  • 有偿服务QQ

手机版|小黑屋|Discuz! 官方交流社区 ( 皖ICP备16010102号 |皖公网安备34010302002376号 )|网站地图|star

GMT+8, 2024-5-3 20:01 , Processed in 0.045836 second(s), 6 queries , Redis On.

Powered by Discuz! W1.0 Licensed

Cpoyright © 2001-2024 Discuz! Team.

关灯 在本版发帖
有偿服务QQ
有偿服务微信
返回顶部
快速回复 返回顶部 返回列表