added check for valid &from & &to paramters
This commit is contained in:
parent
50e1d9dc13
commit
4a2f9be2be
1 changed files with 3 additions and 0 deletions
|
@ -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');
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Add table
Reference in a new issue