Merge pull request #27233 from idayat-noufou/fix_time_plus_duree
Fix: Unsupported operand types
This commit is contained in:
commit
fb6bd52c03
1 changed files with 3 additions and 3 deletions
|
|
@ -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);
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue