[Bug 265395] mail/squirrelmail: INBOX does not populate messages after upgrading php 7.4 to php 8.0
Date: Tue, 07 Feb 2023 20:43:59 UTC
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=265395 --- Comment #6 from Zsolt Udvari <uzsolt@uzsolt.hu> --- IMHO revision 14978 ("Fix poorly written timezone parsing") fixes this bug: $ svn diff -r14978:14976 Index: functions/date.php =================================================================== --- functions/date.php (revision 14978) +++ functions/date.php (revision 14976) @@ -81,16 +81,13 @@ function getGMTSeconds($stamp, $tzc) { break; } $neg = false; - if (preg_match('/^([+-]?)(\d\d)(\d\d)$/', $tzc, $matches)) { - if ($matches[1] === '-') - $neg = true; - $hh = $matches[2]; - $mm = $matches[3]; - } else { - // anything not listed above and not in the form +0400 - // defaults to UTC - $hh = $mm = 0; + if (substr($tzc, 0, 1) == '-') { + $neg = true; + } else if (substr($tzc, 0, 1) != '+') { + $tzc = '+'.$tzc; } + $hh = substr($tzc,1,2); + $mm = substr($tzc,3,2); $iTzc = ($hh * 60 + $mm) * 60; if ($neg) $iTzc = -1 * (int) $iTzc; /* stamp in gmt */ I send a bug report to update squirrelmail: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=269396 -- You are receiving this mail because: You are the assignee for the bug.