diff --git a/app/Ninja/Transformers/EntityTransformer.php b/app/Ninja/Transformers/EntityTransformer.php index 9fd53235b8..e40225af27 100644 --- a/app/Ninja/Transformers/EntityTransformer.php +++ b/app/Ninja/Transformers/EntityTransformer.php @@ -35,7 +35,7 @@ class EntityTransformer extends TransformerAbstract protected function getTimestamp($date) { - return $date ? $date->getTimestamp() : null; + return method_exists($date, 'getTimestamp') ? $date->getTimestamp() : null; } public function getDefaultIncludes()