Add safeguard against question marks entering NodaSplitTime
This commit is contained in:
parent
cc0997f412
commit
dea09b17cd
|
@ -338,11 +338,13 @@ final class NodaSplitTime {
|
||||||
// Calculate start date and end date
|
// Calculate start date and end date
|
||||||
if (($this->before_after_indicator === NodaTimeBeforeAfterIndicator::before
|
if (($this->before_after_indicator === NodaTimeBeforeAfterIndicator::before
|
||||||
|| $this->before_after_indicator === NodaTimeBeforeAfterIndicator::until)
|
|| $this->before_after_indicator === NodaTimeBeforeAfterIndicator::until)
|
||||||
|
|| $start_date === '?'
|
||||||
) {
|
) {
|
||||||
$this->start_date = '-9999-12-31';
|
$this->start_date = '-9999-12-31';
|
||||||
}
|
}
|
||||||
if (($this->before_after_indicator === NodaTimeBeforeAfterIndicator::after
|
if (($this->before_after_indicator === NodaTimeBeforeAfterIndicator::after
|
||||||
|| $this->before_after_indicator === NodaTimeBeforeAfterIndicator::since)
|
|| $this->before_after_indicator === NodaTimeBeforeAfterIndicator::since)
|
||||||
|
|| $end_date === '?'
|
||||||
) {
|
) {
|
||||||
$this->end_date = '9999-12-31';
|
$this->end_date = '9999-12-31';
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user