Merge pull request #16755 from frederic34/patch-14

fix php7 php8 warning
This commit is contained in:
Laurent Destailleur 2021-03-17 16:52:07 +01:00 committed by GitHub
commit 9cbb2e8d42
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1138,7 +1138,11 @@ if (count($listofextcals)) {
if (isset($icalevent['DTSTART;VALUE=DATE'])) { // fullday event
// For full day events, date are also GMT but they wont but converted using tz during output
$datestart = dol_stringtotime($icalevent['DTSTART;VALUE=DATE'], 1);
$dateend = dol_stringtotime($icalevent['DTEND;VALUE=DATE'], 1) - 1; // We remove one second to get last second of day
if (empty($icalevent['DTEND;VALUE=DATE'])) {
$dateend = $datestart + 86400 - 1;
} else {
$dateend = dol_stringtotime($icalevent['DTEND;VALUE=DATE'], 1) - 1; // We remove one second to get last second of day
}
//print 'x'.$datestart.'-'.$dateend;exit;
//print dol_print_date($dateend,'dayhour','gmt');
$event->fulldayevent = 1;