From 7cb9087ffb1eb561cc11dd59dc9ea3dbfb92342c Mon Sep 17 00:00:00 2001 From: Samuel Georges Date: Sat, 23 Apr 2016 05:29:42 +1000 Subject: [PATCH] DateTime throws an invalid arg exception to prevent Twig crashing Remove rounded search style --- modules/backend/widgets/search/partials/_search.htm | 2 +- modules/system/helpers/DateTime.php | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/modules/backend/widgets/search/partials/_search.htm b/modules/backend/widgets/search/partials/_search.htm index c8162bd18..713ea8e84 100644 --- a/modules/backend/widgets/search/partials/_search.htm +++ b/modules/backend/widgets/search/partials/_search.htm @@ -8,6 +8,6 @@ data-track-input data-load-indicator data-load-indicator-opaque - class="form-control searchable " + class="form-control " autocomplete="off" /> diff --git a/modules/system/helpers/DateTime.php b/modules/system/helpers/DateTime.php index 26930e867..ee03e8125 100644 --- a/modules/system/helpers/DateTime.php +++ b/modules/system/helpers/DateTime.php @@ -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;