added check for valid &from & &to paramters

This commit is contained in:
Steffen Vogel 2010-10-19 22:38:33 +02:00
parent 50e1d9dc13
commit 4a2f9be2be

View file

@ -59,6 +59,9 @@ 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');
}
}
/**