From e126747501c9185e6f8691a6e6c02fe14815986b Mon Sep 17 00:00:00 2001 From: Steffen Vogel Date: Thu, 2 Dec 2010 21:22:16 +0100 Subject: [PATCH] fixed typo and datetime parser --- backend/lib/Interpreter/Interpreter.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/backend/lib/Interpreter/Interpreter.php b/backend/lib/Interpreter/Interpreter.php index b59d5d5..1eb0999 100644 --- a/backend/lib/Interpreter/Interpreter.php +++ b/backend/lib/Interpreter/Interpreter.php @@ -63,8 +63,10 @@ abstract class Interpreter implements InterpreterInterface { $this->from = (isset($from)) ? self::parseDateTimeString($from, time() * 1000) : NULL; $this->to = (isset($to)) ? self::parseDateTimeString($to, (isset($this->from)) ? $this->from : time() * 1000) : NULL; - if (!is_null($this->from) && !is_null($this->from) && $this->from > $this->to) { - throw new \Exception('&from is larger than &to parameter'); + Util\Debug::log('time', $this->from, $this->to); + + if (isset($this->from) && isset($this->to) && $this->from > $this->to) { + throw new \Exception('&from is larger than &to parameter'); } }