在PHP5.6.9 中使用Discuz 3.2 ,在运行时出现错误PHP Strict Standards: Declaration of table_forum_post
- 2017-05-17 21:28:00
- zstmtony 原创
- 4613
在PHP5.6.9 中使用Discuz 3.2 ,在运行时出现错误:
PHP Strict Standards: Declaration of table_forum_post::update() should be compatible with discuz_table::update($val, $data, $unbuffered = false, $low_priority = false) in D:\wwwroot\officecn\web\source\class\table\table_forum_post.php on line 881
解决办法:
出现错误提示:
[17-May-2017 15:37:19 Etc/GMT-8] PHP Strict Standards: Declaration of table_forum_post::update() should be compatible with discuz_table::update($val, $data, $unbuffered = false, $low_priority = false) in D:\wwwroot\officecn\web\source\class\table\table_forum_post.php on line 881
[17-May-2017 15:37:19 Etc/GMT-8] PHP Strict Standards: Declaration of table_forum_post::delete() should be compatible with discuz_table::delete($val, $unbuffered = false) in D:\wwwroot\officecn\web\source\class\table\table_forum_post.php on line 881
[17-May-2017 15:37:19 Etc/GMT-8] PHP Strict Standards: Declaration of table_forum_post::insert() should be compatible with discuz_table::insert($data, $return_insert_id = false, $replace = false, $silent = false) in D:\wwwroot\officecn\web\source\class\table\table_forum_post.php on line 881
[17-May-2017 15:37:19 Etc/GMT-8] PHP Strict Standards: Declaration of table_forum_post::fetch() should be compatible with discuz_table::fetch($id, $force_from_db = false) in D:\wwwroot\officecn\web\source\class\table\table_forum_post.php on line 881
[17-May-2017 15:37:19 Etc/GMT-8] PHP Strict Standards: Declaration of table_forum_post::fetch_all() should be compatible with discuz_table::fetch_all($ids, $force_from_db = false) in D:\wwwroot\officecn\web\source\class\table\table_forum_post.php on line 881
[17-May-2017 15:37:19 Etc/GMT-8] PHP Strict Standards: Declaration of table_forum_post::update_cache() should be compatible with discuz_table::update_cache($id, $data, $cache_ttl = NULL, $pre_cache_key = NULL) in D:\wwwroot\officecn\web\source\class\table\table_forum_post.php on line 881
错误原因:
这是由于 php 5.3版本后。有些强制要求。否则就会出现Strict Standards: PHP Strict Standards: Declaration of .... should be compatible with that of .... 的错误提示。
解决办法:在Discuz 文件中,找到相关php 文件。
添加一句:
error_reporting(E_ALL & ~(E_STRICT | E_NOTICE));
问题解决。
这句话的意思是错误报告设置:显示所有错误,但是除了严格错检查或者错误报告。也就是说PHP5.3.3 不执行严格错误检查。也不显示错误提示。跳过严格错误检查。
联系人: | 王先生 |
---|