Warning: Call-time pass-by-reference has been deprecated; If you would like to pass it by reference, modify the declaration of [runtime function name](). If you would like to enable call-time pass-by-reference, you can set allow_call_time_pass_reference to true in your INI file in \site\sites\all\modules\dcl_importer\scripts\baseclass.php on line 113

I know this is a server dependent issue, and an easy fix. I got this error with the newest download of this module.

Change:

$this->splitPage($response, &$header, &$body);

to:

$this->splitPage($response, $header, $body);

I haven't come across a problem with this patch. Many servers probably still have Call-time pass-by-reference enabled. I can't see a patch like this causing too many problems.

Comments

R.Muilwijk’s picture

Status: Needs review » Needs work

This is not the right way to patch this. As you can see the parameters are passed by reference.

	    function splitPage($response,$header,$body)
	    {
	    	$totalLength=strlen($response);
	        $pos=strpos($response,'<html>');
	        $header = substr($response,0,$pos);
	        $body =substr($response,$pos,$totalLength-1);
	        $body=str_replace("\n","",$body);
	        $body=str_replace("\r","",$body);
	        $body = str_replace(" ","",$body);
	    }

this method will actually change the $header var declared in getLocation. That var is later parsed by the getCookies method. However after calling getCookies only $header is used again. A better way would be to return the $header var or use private vars in the object so we can touch them with $this->

jswaby’s picture

Status: Needs work » Active
R.Muilwijk’s picture

Status: Active » Closed (duplicate)

Same error with patch provided

http://drupal.org/node/237878

jswaby’s picture

Status: Closed (duplicate) » Closed (fixed)