Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 170124 - mail-client/squirrelmail errors with preg_split
Summary: mail-client/squirrelmail errors with preg_split
Status: RESOLVED UPSTREAM
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Net-Mail Packages
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-03-09 14:45 UTC by Richard Scott
Modified: 2007-04-11 11:17 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Richard Scott 2007-03-09 14:45:22 UTC
After recent PHP updates there is a bug in squirrelmail where they is a typo.

on line 926 in functions/imap_messages.php there is the following code:

$flags = preg_split('/ /', $regs[1],-1,'PREG_SPLIT_NO_EMPTY');

This needs to be changed to:

$flags = preg_split('/ /', $regs[1],-1,PREG_SPLIT_NO_EMPTY);

The PREG_SPLIT_NO_EMPTY in the original line is being used as a string rather than a long value and this is where the problem comes from.

I guess this needs to be passed back up to the Squirrelmail devs? :-) 

Reproducible: Always
Comment 1 Jakub Moc (RETIRED) gentoo-dev 2007-03-09 19:36:49 UTC
(In reply to comment #0)
> After recent PHP updates > I guess this needs to be passed back up to the Squirrelmail devs? :-) 

Yeah, so do it?

Comment 2 Richard Scott 2007-03-09 23:28:38 UTC
> Yeah, so do it?

Thank you for your constructive comment.....what are you 10 years old?!
Comment 3 Andrej Kacian (RETIRED) gentoo-dev 2007-04-10 23:24:26 UTC
Looks like this is already fixed in 1.4.9a (which is stable for all arches):

ticho@thelair ~/wrk/squirrelmail-1.4.9a/functions $ grep PREG_SPLIT_NO_EMPTY imap_messages.php
        $thread_new[$i] = preg_split("/\|/", $thread_new[$i], -1, PREG_SPLIT_NO_EMPTY);
        $thread_temp = preg_split("//", $thread_list, -1, PREG_SPLIT_NO_EMPTY);
    $thread_list = preg_split("/\s/", $thread_list, -1, PREG_SPLIT_NO_EMPTY);
                $flags = preg_split('/ /', $regs[1],-1,PREG_SPLIT_NO_EMPTY);
ticho@thelair ~/wrk/squirrelmail-1.4.9a/functions $ 

Thank you for your concern though, and... Just ignore Jakub please.
Comment 4 Richard Scott 2007-04-11 10:06:20 UTC
Sorry, I forgot to say that I'm using the squirrelmail-1.5.1-r1 release.
Comment 5 Andrej Kacian (RETIRED) gentoo-dev 2007-04-11 11:17:55 UTC
(In reply to comment #4)
> Sorry, I forgot to say that I'm using the squirrelmail-1.5.1-r1 release.
> 

Fixed in upstream SVN as well. :)

ticho@daria ~/svnarea/squirrelmail/functions $ grep PREG_SPLIT imap_messages.php
                $flags = preg_split('/ /', $regs[1],-1,PREG_SPLIT_NO_EMPTY);