Page 1 of 1

PHP upgrade causes SquirrelMail error reading new messages.

Posted: Mon May 28, 2007 10:59 am
by jasonb
After upgrading to the latest PHP, SquirrelMail 1.5.1 started showing "Message: preg_split() expects parameter 4 to be long, string given" at the bottom of each message.

This is fixed by modifying line 926 of functions/imap_messages.php.

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

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

(Change "NI" to "NO" and remove the single quotes around the parameter.)