preg_split 函式的 flag 為 PREG_SPLIT_NO_EMPTY,不是 PREG_SPLIT_NI_EMPTY,且不能用單引號括起來。
[root@mail squirrelmail-1.4.8]# diff -uwN ./functions/imap_messages.php /var/www/squirrelmail/functions/imap_messages.php
--- ./functions/imap_messages.php 2006-07-29 16:46:57.000000000 +0800
+++ /var/www/squirrelmail/functions/imap_messages.php 2013-08-30 19:56:15.702472423 +0800
@@ -805,7 +805,7 @@
if ($read) {
if (preg_match('/.+FLAGS\s\((.*)\)\s/AUi',$read[0],$regs)) {
if (trim($regs[1])) {
- $flags = preg_split('/ /', $regs[1],-1,'PREG_SPLIT_NI_EMPTY');
+ $flags = preg_split('/ /', $regs[1],-1,PREG_SPLIT_NO_EMPTY); //dywang
}
}
} else {