Typological Error in Squirrelmail 1.4.0

If you install Squirrelmail as your webmail application, have you ever seen this following error messages?
Warning: preg_split() expects parameter 4 to be long, string given in /usr/local/www/squirrelmail/functions/imap_messages.php on line 806

Warning: Invalid argument supplied for foreach() in /usr/local/www/squirrelmail/functions/mime.php on line 53

I found this little bit irritating bug when I was replying an e-mail from my friend. For your information, I had installed Squirrelmail version 1.4.0 in my own server. Actually it wasn't only the core Squirrelmail application, but also the additional UI theme.

Actually, there was no functionality impact on writing/sending e-mail. The mail can still be sent and delivered successfully, but those error messages are just a bit annoying to me. So, I searched the bug fix via Google, and then I found the solution easily. Voila! Just a typological error, and here is the solution,

Open the file which is first mentioned in the error message, and go to the following line (806).
Replace this line:

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

with

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

That's all. Thanks for viewing and have a good day!

-KnightDNA-
blog comments powered by Disqus