fix PHP 8.3 Error: Cannot create dynamic property DateMalformedStringException::$details

This commit is contained in:
ralf 2024-04-29 12:23:28 +02:00
parent 4e047d8f06
commit ba6f207f5f

View File

@ -133,8 +133,11 @@ class Date extends Transformer
} }
catch (\Exception $e) { catch (\Exception $e) {
// do NOT stall for somehow invalid values: log it and return empty // do NOT stall for somehow invalid values: log it and return empty
$e->details = $this->id.': '.json_encode($value); if($value)
_egw_log_exception($e); {
//error_log(__METHOD__."()".$this->id . ': ' . json_encode($value));
_egw_log_exception($e);
}
return null; return null;
} }
} }
@ -295,4 +298,4 @@ class Date extends Transformer
\EGroupware\Api\Etemplate\Widget::registerWidget(__NAMESPACE__ . '\\Date', \EGroupware\Api\Etemplate\Widget::registerWidget(__NAMESPACE__ . '\\Date',
array('et2-date', 'et2-date-time', 'time_or_date') array('et2-date', 'et2-date-time', 'time_or_date')
); );