【问题标题】:wordpress Fatal error: Call-time pass-by-reference has been removed in /home/xxx/public_html/wp-content/themes/xxx/functions.php on line 202 [duplicate]wordpress 致命错误:在第 202 行的 /home/xxx/public_html/wp-content/themes/xxx/functions.php 中删除了调用时传递引用 [重复]
【发布时间】:2014-01-12 18:00:03
【问题描述】:

我的 wordpress 网页出现此错误:

wordpress 致命错误:在第 202 行的 /home/xxx/public_html/wp-content/themes/xxx/functions.php 中删除了调用时传递引用

以下是相关代码:

200 class pont_Walker extends Walker_Nav_Menu{
201  function end_el(&$output, $category, $depth, $args){
202    $output=preg_replace("/([^>]{1})(<\/a>)/", "$1<span></span>$2", &$output);
203    $output.="</li>\n";
204  }

【问题讨论】:

  • 删除preg_replace 行中$output 之前的&amp;。另请参阅重复项。

标签: php wordpress


【解决方案1】:

从 &$output 中删除 & 并试一试。 :)

function end_el($output, $category, $depth, $args) {.... }

$output=preg_replace("/([^>]{1})(<\/a>)/", "$1<span></span>$2", &$output);

【讨论】:

  • 谢谢你非常匹配 Vijayakumar Selvaraj,所有作品
  • 已解决。谢谢 Vijayakumar Selvaraj,一切正常,非常感谢
猜你喜欢
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2021-06-06
  • 2017-01-29
  • 2023-03-10
  • 1970-01-01
  • 1970-01-01
相关资源
最近更新 更多