]> git.ipfire.org Git - thirdparty/bugzilla.git/commitdiff
Bug 1317777 - REST API 1.0 - datetime inputs cause server error 33/head
authortvau <aleph00@mail.com>
Tue, 15 Nov 2016 20:13:00 +0000 (21:13 +0100)
committerGitHub <noreply@github.com>
Tue, 15 Nov 2016 20:13:00 +0000 (21:13 +0100)
Use datetime_format_inbound from Bugzilla::API::1_0::Util package.

Bugzilla/API/1_0/Server.pm

index 4dd0c7ddbe3d15e9723ddedbadecc59174dee7fd..40d6f3b15271b9497dbf794c56de5594031ad669 100644 (file)
@@ -12,7 +12,7 @@ use strict;
 use warnings;
 
 use Bugzilla::API::1_0::Constants qw(API_AUTH_HEADERS);
-use Bugzilla::API::1_0::Util qw(taint_data fix_credentials api_include_exclude);
+use Bugzilla::API::1_0::Util qw(taint_data fix_credentials api_include_exclude datetime_format_inbound);
 
 use Bugzilla::Constants;
 use Bugzilla::Error;
@@ -251,10 +251,10 @@ sub _params_check {
             my $value = $params->{$field};
             if (ref $value eq 'ARRAY') {
                 $params->{$field} =
-                    [ map { $self->datetime_format_inbound($_) } @$value ];
+                    [ map { datetime_format_inbound($_) } @$value ];
             }
             else {
-                $params->{$field} = $self->datetime_format_inbound($value);
+                $params->{$field} = datetime_format_inbound($value);
             }
         }
     }