Merge pull request #27233 from idayat-noufou/fix_time_plus_duree

Fix: Unsupported operand types
This commit is contained in:
Laurent Destailleur 2023-12-28 12:44:00 +01:00 committed by GitHub
commit fb6bd52c03
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -122,12 +122,12 @@ function getServerTimeZoneInt($refgmtdate = 'now')
function dol_time_plus_duree($time, $duration_value, $duration_unit, $ruleforendofmonth = 0)
{
global $conf;
if (empty($duration_value)) {
return $time;
}
if ($duration_unit == 's') {
return $time + ($duration_value);
}
if ($duration_value == 0) {
return $time;
}
if ($duration_unit == 'i') {
return $time + (60 * $duration_value);
}