Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 208012 - mail-client/squirrelmail-1.4.6-r2 preg_split() expects parameter 4 to be long
Summary: mail-client/squirrelmail-1.4.6-r2 preg_split() expects parameter 4 to be long
Status: RESOLVED INVALID
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: All Linux
: High minor (vote)
Assignee: Gentoo Linux bug wranglers
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-01-29 09:37 UTC by Richard Scott
Modified: 2008-01-29 09:43 UTC (History)
0 users

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 2008-01-29 09:37:40 UTC
Hi,

I've noticed the following error on random message viewing on Squirrelmail. Please note that this happens randomly on the same message being viewed time and time again. Some times the error is there, sometimes its not. Here's the error:

Warning: preg_split() expects parameter 4 to be long, string given in /var/www/localhost/htdocs/squirrelmail/functions/imap_messages.php on line 806
Warning: Invalid argument supplied for foreach() in /var/www/localhost/htdocs/squirrelmail/functions/mime.php on line 53

The fix is to edit line 806 in imap_messages.php and change it from this:

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

To this:

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

Notice the removal of the quotes around PREG_SPLIT_NO_EMPTY.



Reproducible: Always

Steps to Reproduce:
1. emerge squirrelmail
2. view a message in an imap store
3. wait to see if you get the error.
Comment 1 Jakub Moc (RETIRED) gentoo-dev 2008-01-29 09:43:13 UTC
There's no 1.4.6-r2 in the tree, been removed 8 months ago.