mirror of
https://github.com/wintercms/winter.git
synced 2024-06-28 05:33:29 +02:00
DateTime throws an invalid arg exception to prevent Twig crashing
Remove rounded search style
This commit is contained in:
parent
0504da41f2
commit
7cb9087ffb
@ -8,6 +8,6 @@
|
||||
data-track-input
|
||||
data-load-indicator
|
||||
data-load-indicator-opaque
|
||||
class="form-control searchable <?= $cssClasses ?>"
|
||||
class="form-control <?= $cssClasses ?>"
|
||||
autocomplete="off" />
|
||||
</div>
|
||||
|
@ -4,6 +4,7 @@ use Lang;
|
||||
use Carbon\Carbon;
|
||||
use Exception;
|
||||
use DateTime as PhpDateTime;
|
||||
use InvalidArgumentException;
|
||||
|
||||
class DateTime
|
||||
{
|
||||
@ -72,7 +73,7 @@ class DateTime
|
||||
}
|
||||
|
||||
if (!$value instanceof Carbon && $throwException) {
|
||||
throw new Exception('Invalid date value supplied to DateTime helper.');
|
||||
throw new InvalidArgumentException('Invalid date value supplied to DateTime helper.');
|
||||
}
|
||||
|
||||
return $value;
|
||||
|
Loading…
x
Reference in New Issue
Block a user