Home > WordPress技巧 > Declaration of wpdb_mysqli::db_connect() should be compatible with wpdb::db_connect(

Declaration of wpdb_mysqli::db_connect() should be compatible with wpdb::db_connect(

March 31st, 2018      Leave a comment Go to comments

 

将博客从3.8.5升级到4.9.4只有,主页和后台管理页面都报错:

Warning: Declaration of wpdb_mysqli::db_connect() should be compatible with wpdb::db_connect($allow_bail = true) in /xxx/wp-content/db.php on line 308

搜索发现不少基于WordPress的网站都有这个情况。

解决办法:删掉wp-content/db.php或者不使用原生wpdb类的扩展类wpdb_mysqli。

Categories: WordPress技巧 Tags:
  1. No comments yet.
  1. No trackbacks yet.