#1484830 closed Feature Patches (wontfix)
PHP Fatal error: Only variables can be passed by reference in program/steps/mail/sendmail.inc on line 354
| Reported by: | maharaja | Owned by: | till |
|---|---|---|---|
| Priority: | 5 | Milestone: | 0.1.1 |
| Component: | Client Scripts | Version: | 0.1-stable |
| Severity: | normal | Keywords: | |
| Cc: | roundcube@… |
Description
PHP Version 5.0.5-Debian-0.8~sarge1 (Debian GNU/Linux) - i know, this one is old ;)
patch for the error
--- roundcubemail-0.1/program/steps/mail/sendmail.inc 2008-02-20 00:59:38.000000000 +0100
+++ webmailprogram/steps/mail/sendmail.inc 2008-03-04 10:06:23.408231500 +0100
@@ -350,8 +350,11 @@ if ($CONFIG[$store_target])
$store_folder = TRUE;
// append message to sent box
- if ($store_folder)
- $saved = $IMAP->save_message($CONFIG[$store_target], $MAIL_MIME->getMessage());
+ if ($store_folder) {
+ $tmp_msg = $MAIL_MIME->getMessage();
+ $saved = $IMAP->save_message($CONFIG[$store_target], $tmp_msg);
+ unset($tmp_msg);
+ }
// raise error if saving failed
if (!$saved)
Change History (6)
comment:1 Changed 5 years ago by maharaja
comment:2 Changed 5 years ago by till
But seriously, can you update your PHP first? I mean, 5.0.5 is really old. 5.1.x would be the minimum I consider "stable" or "complete".
Also, what exactly did you do to get this error?
comment:3 Changed 5 years ago by maharaja
i just wanted to send a message :)
for the php version: i am running on debian oldstable (sarge) and the only php5 version i got back then was php 5.0.5 from http://people.debian.org/~dexter .
right now i saw that he put on php 5.1.4 but as this server is in a production environment, upgrading is not *that* easy.
moreover, the installer states that my php version is good ;P moreover, 5.0.5 is the latest from the 5.0.x series. so i consider this a "bug".
comment:4 Changed 5 years ago by till
- Owner set to till
- Status changed from new to assigned
Hehe... That's a flaw in the installer. I'll get to this.
Basically, 0.1-stable aims on PHP4. But I will check this out.
Give me some time. :-)
comment:5 Changed 5 years ago by till
- Version changed from 0.1-rc2 to 0.1-stable
comment:6 Changed 5 years ago by till
- Resolution set to wontfix
- Status changed from assigned to closed
Reviewing this, this is a PHP bug and you run a way out-dated version.
Point taken, references are obsolete. But PHP5 should not fatal in this case. Maybe PHP6 should but for the time being this is subject to E_STRICT standards (and should be treated as such in PHP5.2.x.).

sorry, i made a typo in the +++ line. fixed
--- roundcubemail-0.1/program/steps/mail/sendmail.inc 2008-02-20 00:59:38.000000000 +0100 +++ webmail/program/steps/mail/sendmail.inc 2008-03-04 10:06:23.408231500 +0100 @@ -350,8 +350,11 @@ if ($CONFIG[$store_target]) $store_folder = TRUE; // append message to sent box - if ($store_folder) - $saved = $IMAP->save_message($CONFIG[$store_target], $MAIL_MIME->getMessage()); + if ($store_folder) { + $tmp_msg = $MAIL_MIME->getMessage(); + $saved = $IMAP->save_message($CONFIG[$store_target], $tmp_msg); + unset($tmp_msg); + } // raise error if saving failed if (!$saved)