Only log invalid date values when there's a value to log

This commit is contained in:
nathan 2023-11-17 10:25:36 -07:00
parent 5680224346
commit 95019464bd

View File

@ -133,8 +133,11 @@ class Date extends Transformer
}
catch (\Exception $e) {
// do NOT stall for somehow invalid values: log it and return empty
$e->details = $this->id.': '.json_encode($value);
_egw_log_exception($e);
if($value)
{
$e->details = $this->id . ': ' . json_encode($value);
_egw_log_exception($e);
}
return null;
}
}