简体   繁体   English

Drupal站点问题通过引用传递

[英]Drupal site issue with pass by reference

PHP Fatal error: Call-time pass-by-reference has been removed in /XXX/modules/XXXX/XXXX.module on line 227 PHP致命错误:第227行的/XXX/modules/XXXX/XXXX.module中的调用时传递引用已被删除

The site was working perfectly on my machine. 该站点在我的机器上运行正常。 Suddenly after few days I started getting this above error without any code change. 几天后突然,我开始收到上述错误,没有任何代码更改。 By going through the log files I got the above error. 通过查看日志文件,我得到了上面的错误。 So I changed 所以我改变了

   227     template_preprocess(&$variables);

by 通过

   227     template_preprocess($variables);

And my site started to work. 我的网站开始工作了。 But I was not able to figure out the exact reason for the issue like the same code worked previously and now creating the issue. 但是我无法找出问题的确切原因,就像以前使用相同的代码并现在创建问题一样。

Been a CMS(Content Management System) I have only created new contents and added taxonomy. 曾经是CMS(内容管理系统),我只创建了新内容并添加了分类法。 There was no change done to code. 代码没有做任何更改。

The PHP Fatal Error occurs because the server is running PHP 5.4 now but you are using PHP 5.3 or an earlier version (check your version in admin/reports/status in Drupal). 由于服务器当前正在运行PHP 5.4,但您使用的是PHP 5.3或更早版本,因此发生PHP致命错误 (请在Drupal中的admin / reports / status中检查您的版本)。 If this did not happen on the server up until recently then it is possible that your host updated the version they are running. 如果直到最近才在服务器上发生这种情况,则主机可能更新了它们正在运行的版本。

The solution is to make sure you have updated Drupal and all your modules and report the bug to the module's maintainer. 解决方案是确保已更新Drupal和所有模块,并将错误报告给模块的维护者。

Related: PHP's supported versions 相关: PHP支持的版本

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM