简体   繁体   中英

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

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. 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). 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.

Related: PHP's supported versions

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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