Bug 1903 - Reference problem in MailTemplate.inc.php
Reference problem in MailTemplate.inc.php
Status: RESOLVED FIXED
Product: OJS
Classification: Unclassified
Component: General
2.0.3
PC Linux
: P2 normal
Assigned To: Alec Smecher
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2005-10-19 11:38 PDT by Alec Smecher
Modified: 2005-10-19 11:51 PDT (History)
1 user (show)

See Also:
Version Reported In:
Also Affects:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Alec Smecher 2005-10-19 11:38:00 PDT
From Nick Caramello:

--------------

The mailtemplate.inc.php file has code that is
something along these lines:

	if (is_array(Request::getUserVar('to'))) {
		$this->setRecipients($this->processAddresses
($this->getRecipients(),  Request::getUserVar('to'))); 
	}

Which does not work very well since processAddresses takes
Request::getUserVar('to') as a reference, and it chokes (at least on my
version of PHP and OS).  It is easily fixable by changing the code to

	$to = Request::getUserVar('to');
	if (is_array($to)) {
		$this->setRecipients($this->processAddresses
($this->getRecipients(), $to));
	}


-----------

Apparently only certain versions of PHP complain about this.
Comment 1 Alec Smecher 2005-10-19 11:47:20 PDT
Corrected in BRANCH-2_0 (pre-2.0.3) and CVS HEAD (pre-2.1).
Comment 2 Alec Smecher 2005-10-19 11:51:38 PDT
PHP 5.0.5 is known to complain in this situation.