Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 208012

Summary: mail-client/squirrelmail-1.4.6-r2 preg_split() expects parameter 4 to be long
Product: Gentoo Linux Reporter: Richard Scott <gentoo.bugs>
Component: New packagesAssignee: Gentoo Linux bug wranglers <bug-wranglers>
Status: RESOLVED INVALID    
Severity: minor    
Priority: High    
Version: unspecified   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---

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.