]> git.ipfire.org Git - thirdparty/bugzilla.git/commitdiff
Fix bustage due to bug 801664
authorFrédéric Buclin <LpSolit@gmail.com>
Wed, 2 Jan 2013 18:44:44 +0000 (19:44 +0100)
committerFrédéric Buclin <LpSolit@gmail.com>
Wed, 2 Jan 2013 18:44:44 +0000 (19:44 +0100)
Bugzilla/Bug.pm

index 6680ede55fe1cd00c7425f583f215ba6681fcdae..7c7e0fb37ca6900058d0a95071388c96aea6799f 100644 (file)
@@ -1990,11 +1990,11 @@ sub _check_field_is_mandatory {
 
 sub _check_date_field {
     my ($invocant, $date) = @_;
-    return _check_datetime_field($invocant, $date, 1);
+    return $invocant->_check_datetime_field($date, undef, {date_only => 1});
 }
 
 sub _check_datetime_field {
-    my ($invocant, $date_time, $date_only) = @_;
+    my ($invocant, $date_time, $field, $params) = @_;
 
     # Empty datetimes are empty strings or strings only containing
     # 0's, whitespace, and punctuation.
@@ -2008,7 +2008,7 @@ sub _check_datetime_field {
         ThrowUserError('illegal_date', { date   => $date,
                                          format => 'YYYY-MM-DD' });
     }
-    if ($time && $date_only) {
+    if ($time && $params->{date_only}) {
         ThrowUserError('illegal_date', { date   => $date_time,
                                          format => 'YYYY-MM-DD' });
     }