Re: Squirrelmail returns blank page after send (PHP 7: Warning: contains logs )
[email protected] Tue, 6 Dec 2016 11:05:25 +1300
| Newsgroups | gmane.mail.squirrelmail.devel |
|---|---|
| Message-ID | <[email protected]> |
On Mon, December 5, 2016 17:57, Kevin Buckley wrote:
> I put the original coee back as it was, as it appears we've been
> getting away with filling up the log files for a while now and so
> perhaps the "Deprecated ..." isn't the issue.
>
> We've now found another line in the logs that's clearly "fatal",
> to whit:
>
>
> PHP Fatal error: Redefinition of parameter $ignore in
> /usr/pkg/share/squirrelmail/class/deliver/Deliver_SendMail.class.php on
> line 92, referer:
> https://our.box/squirrelmail//src/compose.php?mailbox=INBOX&startMessage=1
>
> Yet to investigate that as need to go home.
This is an absolutely marvellous issue !
Here's that function
function initStream($message, $sendmail_path, $ignore=0, $ignore='',
$ignore='', $ignore='', $ignore='', $ignore=false, $ignore='',
$ignore=array()) {
$rfc822_header = $message->rfc822_header;
$from = $rfc822_header->from[0];
$envelopefrom = trim($from->mailbox.'@'.$from->host);
$envelopefrom =
str_replace(array("\0","\n"),array('',''),$envelopefrom);
// save executed command for future reference
$this->sendmail_command = "$sendmail_path $this->sendmail_args
-f$envelopefrom";
// open process handle for writing
$stream = popen(escapeshellcmd($this->sendmail_command), "w");
return $stream;
}
Note that not only $ignore used SEVEN times in the function signature,
but is set to two different things in there "0" and false, and the
values really are "ignored" within the function.
Renaming the multiplicity of $ignore-s to be $ignore1, $ignore2,
and so on, sees the ability to send mail return, to our installtion
anyway.
This is currently the only "fix" I have applied to our installtion,
so if there are any thoughts on my attempts to remove all of that
"Deprecated" crud by adding in a __constructor method (or whether
this /has been/is being/ done in some branch of the codebase), they'd
be appreciated.
Kevin
------------------------------------------------------------------------------
Developer Access Program for Intel Xeon Phi Processors
Access to Intel Xeon Phi processor-based developer platforms.
With one year of Intel Parallel Studio XE.
Training and support from Colfax.
Order your platform today.http://sdm.link/xeonphi
-----
squirrelmail-devel mailing list
Posting guidelines: http://squirrelmail.org/postingguidelines
List address: [email protected]
List archives: http://news.gmane.org/gmane.mail.squirrelmail.devel
List info (subscribe/unsubscribe/change options): https://lists.sourceforge.net/lists/listinfo/squirrelmail-devel