avelsieve does not work with php7

Bug #1620047 reported by j^
16
This bug affects 3 people
Affects Status Importance Assigned to Milestone
avelsieve (Ubuntu)
Confirmed
Undecided
Unassigned

Bug Description

PHP Fatal error: Switch statements may only contain one default clause in /usr/share/squirrelmail/plugins/avelsieve/include/sieve_buildrule.inc.php on line 670

Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in avelsieve (Ubuntu):
status: New → Confirmed
Revision history for this message
Wolfgang (wt-lists) wrote :

In accordance with this information https://wiki.php.net/rfc/switch.default.multiple on PHP.net in older php versions only the last "default:" statement would be used. It therefore should not break the code if the first "default:" clause is removed.

To "fix" the problem in avelsieve version 1.9.9 I manually did the following:

edit file /usr/share/squirrelmail/plugins/avelsieve/include/sieve_buildrule.inc.php
go to line 584 and comment out the "default:" line:

like this:
...
    switch ($rule['action']) {
    case '1': /* keep (default) */
/* default: commented out, only one default clause allowed */
        $out .= 'keep' . (!empty($flags_out) ? " $flags_out" : '' ) . ';';
        $text .= _("<em>keep</em> the message.");
        $terse .= _("Keep");
...

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.