Fix for transformer timestamp

This commit is contained in:
Hillel Coren 2017-01-08 12:31:32 +02:00
parent 31891fe1b7
commit 0f20fcc497

View File

@ -35,7 +35,7 @@ class EntityTransformer extends TransformerAbstract
protected function getTimestamp($date) protected function getTimestamp($date)
{ {
return $date ? $date->getTimestamp() : null; return method_exists($date, 'getTimestamp') ? $date->getTimestamp() : null;
} }
public function getDefaultIncludes() public function getDefaultIncludes()