mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2024-11-10 05:02:36 +01:00
Fix for task archived_at in API
This commit is contained in:
parent
255f8baaa9
commit
1cb9c15925
@ -37,7 +37,13 @@ class EntityTransformer extends TransformerAbstract
|
||||
|
||||
protected function getTimestamp($date)
|
||||
{
|
||||
return method_exists($date, 'getTimestamp') ? $date->getTimestamp() : null;
|
||||
if (method_exists($date, 'getTimestamp')) {
|
||||
return $date->getTimestamp();
|
||||
} elseif (is_string($date)) {
|
||||
return strtotime($date);
|
||||
} else {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
public function getDefaultIncludes()
|
||||
|
Loading…
Reference in New Issue
Block a user