Commit 8d720931 authored by tvau's avatar tvau Committed by GitHub

Bug 1317777 - REST API 1.0 - datetime inputs cause server error

Use datetime_format_inbound from Bugzilla::API::1_0::Util package.
parent 3c60fba2
......@@ -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);
}
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment