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.

CommentFileSizeAuthor
#7 1293776-7-mobile_jquery.patch602 bytesryan.thomas

Comments

lquessenberry’s picture

I am getting the same exact error, but I have no panels on my site.

lquessenberry’s picture

Issue tags: +Call-time pass-by-reference deprecated

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

function mobile_jquery_preprocess_dashboard_admin_display_form(&$vars) {
	mobile_jquery_preprocess_block_admin_display_form(&$vars);

Remove those pesky ampersands in the variable "vars" and the error will vanish!

Lines 302 and 303 should now read:

function mobile_jquery_preprocess_dashboard_admin_display_form($vars) {
	mobile_jquery_preprocess_block_admin_display_form($vars);

Basically for those two lines, replace (&$vars) with ($vars) and you are set to go.

laroccadahouse’s picture

that worked for me, thanks!

ecourmont’s picture

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

hbergin’s picture

Thanks, this worked for me on mobile_jquery-7.x-1.1-beta1 file mobile_jquery/template.php (line 303)

Original code:

/**
 * Preprocesses variables for block-admin-display-form.tpl.php.
 */
function mobile_jquery_preprocess_dashboard_admin_display_form(&$vars) {
	mobile_jquery_preprocess_block_admin_display_form(&$vars);

Updated code:

/**
 * Preprocesses variables for block-admin-display-form.tpl.php.
 */
function mobile_jquery_preprocess_dashboard_admin_display_form(&$vars) {
	mobile_jquery_preprocess_block_admin_display_form($vars);
mgifford’s picture

Thanks @hbergin that worked for me too.

ryan.thomas’s picture

Status: Active » Needs review
StatusFileSize
new602 bytes

Removed the ampersand per comment #6

jeffschuler’s picture

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

charlietoleary’s picture

Status: Needs review » Reviewed & tested by the community

Confirming #7 corrects this issue

jasonsavino’s picture

Status: Reviewed & tested by the community » Closed (fixed)
avpaderno’s picture

Issue summary: View changes
Issue tags: -Call-time pass-by-reference deprecated +deprecated