I'm getting the following error on my mobile site:
Deprecated function: Call-time pass-by-reference has been deprecated in phptemplate_init() (line 14 of /disks/www/.../themes/engines/phptemplate/phptemplate.engine).
This is only showing on pages that are built with panels.
I'm posting this issue to both this queue and to the panels queue as I'm not sure where the error is originating from.
| Comment | File | Size | Author |
|---|---|---|---|
| #7 | 1293776-7-mobile_jquery.patch | 602 bytes | ryan.thomas |
Comments
Comment #1
lquessenberry commentedI am getting the same exact error, but I have no panels on my site.
Comment #2
lquessenberry commentedHey guys, I fixed this, at least for me. Apparently this is an issue if you are using PHP5.x and up. I noticed the error was telling me it was on line 303 of the template.php file.
Remove those pesky ampersands in the variable "vars" and the error will vanish!
Lines 302 and 303 should now read:
Basically for those two lines, replace (&$vars) with ($vars) and you are set to go.
Comment #3
laroccadahouse commentedthat worked for me, thanks!
Comment #4
ecourmont commentedAs written in the PHP warning message it's a function called with parameters passed by reference that's deprecated...
so to fix it you just need to change the line 303:
mobile_jquery_preprocess_block_admin_display_form(&$vars);to
mobile_jquery_preprocess_block_admin_display_form($vars);the function declaration must keep "pass by reference" parameter and you shouldn't change its declaration.
function mobile_jquery_preprocess_dashboard_admin_display_form(&$vars)Comment #5
hbergin commentedThanks, this worked for me on mobile_jquery-7.x-1.1-beta1 file mobile_jquery/template.php (line 303)
Original code:
Updated code:
Comment #6
mgiffordThanks @hbergin that worked for me too.
Comment #7
ryan.thomas commentedRemoved the ampersand per comment #6
Comment #8
jeffschulerIndents should use 2 spaces instead of tabs, (though this was there already and the whole theme has this issue...)
Otherwise, patch in #7 is RTBC.
Comment #9
charlietoleary commentedConfirming #7 corrects this issue
Comment #10
jasonsavino commentedComment #11
avpaderno