Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
I was getting this error:
Deprecated function: Call-time pass-by-reference has been deprecated in phptemplate_init() (line 14 of /var/www/shoppers/themes/engines/phptemplate/phptemplate.engine).
solution: just go to your template.php file and replace all instances of &$vars
with $vars
Comment | File | Size | Author |
---|---|---|---|
#9 | twitter_bootstrap-pass-by-reference-1423518-9.patch | 473 bytes | heddn |
Comments
Comment #1
aristeides CreditAttribution: aristeides commentedyou should do the same in all the files inside includes/modules
Comment #2
farhadhf CreditAttribution: farhadhf commentedThe error still shows up after removing & from &$vars in template.php and files inside includes/modules,
Also removing & from twitter_bootstrap_preprocess_region(&$vars) shouldn't be removed, or sidebars won't be rendered properly.
How can I track down the probelm?
(I'm using PHP 5.3.9)
Comment #3
arno_b CreditAttribution: arno_b commentedIn template.php, removing the & in &$form_state seems to do the trick.
Comment #4
gagarine CreditAttribution: gagarine commentedTo be clear
$form = search_form($form, &$form_state);
need to be replaced by
$form = search_form($form, $form_state);
Comment #5
gagarine CreditAttribution: gagarine commentedlet move that to critical.
If you use php-fmp it will totally crash with a SIGSEGV. This kind of error are very hard to debug as you don't have anythings in logs and just a blank nginx error page with "bad gateway". (If someone has a hint about how to debug SIGSEGV please let me know)
I first think it was my APC but switch it off didn't change anything.
Comment #6
frankbaele CreditAttribution: frankbaele commentedComment #7
frankbaele CreditAttribution: frankbaele commentedused #4 solution
Comment #9
heddnIs this going to get rolled into the 7.x.1.x rev? If so, attached is a patch to apply it there.
Comment #10
frankbaele CreditAttribution: frankbaele commentedComment #12
andregriffin CreditAttribution: andregriffin commentedComment #12.0
andregriffin CreditAttribution: andregriffin commentedclarification