zoukankan      html  css  js  c++  java
  • Warning:Parameter 2 to qtranxf_postsFilter() expected to be a reference, value given in解决方法

      今天ytkah在看客户的网站时发现头部提示Warning:Parameter 2 to qtranxf_postsFilter() expected to be a reference, value given in ...,出现这个原因是翻译插件定义有问题,那我们一起来看看如何修改吧

      打开文件qtranslate-x/qtranslate_frontend.php,找到大概523行左右

    function qtranxf_postsFilter($posts,&$query) {//WP_Query
    

      改成

    function qtranxf_postsFilter($posts,$query) {//WP_Query
    

      还有另外一处修改,大概597行左右

    function qtranxf_excludeUntranslatedPosts($where,&$query) {//WP_Query
    

      改成

    function qtranxf_excludeUntranslatedPosts($where,$query) {//WP_Query
    

      保存,刷新缓存,错误提示消失了

      参考资料https://wordpress.org/support/topic/problem-with-php-7-1-2/#post-8908632

  • 相关阅读:
    MySQL经典练习题(四)
    MySQL经典练习题(三)
    MySQL经典练习题(二)
    MySQL经典练习题(一)
    MySQL经典练习题-数据准备
    表连接
    子查询
    MySQL中函数分类
    排序
    数据分组
  • 原文地址:https://www.cnblogs.com/ytkah/p/14137049.html
Copyright © 2011-2022 走看看