From ae88ebf6a44e3bd01158116f71cb0374aff73dc2 Mon Sep 17 00:00:00 2001 From: Hillel Coren Date: Sun, 8 Jan 2017 12:32:03 +0200 Subject: [PATCH] Fix for transformer timestamp --- app/Ninja/Transformers/EntityTransformer.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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()