From 8d720931bc4d84f2a0f5cdc3755f9af4f1f9cee2 Mon Sep 17 00:00:00 2001 From: tvau Date: Tue, 15 Nov 2016 21:13:00 +0100 Subject: Bug 1317777 - REST API 1.0 - datetime inputs cause server error Use datetime_format_inbound from Bugzilla::API::1_0::Util package. --- Bugzilla/API/1_0/Server.pm | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Bugzilla/API/1_0/Server.pm b/Bugzilla/API/1_0/Server.pm index 4dd0c7ddb..40d6f3b15 100644 --- a/Bugzilla/API/1_0/Server.pm +++ b/Bugzilla/API/1_0/Server.pm @@ -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); } } } -- cgit v1.2.3-24-g4f1b