summaryrefslogtreecommitdiffstats
path: root/Bugzilla
diff options
context:
space:
mode:
authorDylan William Hardison <dylan@hardison.net>2018-05-23 15:10:55 +0200
committerGitHub <noreply@github.com>2018-05-23 15:10:55 +0200
commitff60b109bcd1a83f79b45296a9bc679ad9fd1f6b (patch)
treea3bfcff4e97aec320e90b261bd1c0cf433bc46d8 /Bugzilla
parent8b54dc1e1ada823d5e6c655f295e52602681226b (diff)
downloadbugzilla-ff60b109bcd1a83f79b45296a9bc679ad9fd1f6b.tar.gz
bugzilla-ff60b109bcd1a83f79b45296a9bc679ad9fd1f6b.tar.xz
Bug 1461400 - Log errors in webservices when undef values are passed to $self->type()
Diffstat (limited to 'Bugzilla')
-rw-r--r--Bugzilla/WebService/Server/XMLRPC.pm12
1 files changed, 10 insertions, 2 deletions
diff --git a/Bugzilla/WebService/Server/XMLRPC.pm b/Bugzilla/WebService/Server/XMLRPC.pm
index fce865e88..6bb73af01 100644
--- a/Bugzilla/WebService/Server/XMLRPC.pm
+++ b/Bugzilla/WebService/Server/XMLRPC.pm
@@ -11,6 +11,7 @@ use 5.10.1;
use strict;
use warnings;
+use Bugzilla::Logging;
use XMLRPC::Transport::HTTP;
use Bugzilla::WebService::Server;
if ($ENV{MOD_PERL}) {
@@ -32,8 +33,15 @@ BEGIN {
if ($type eq 'dateTime') {
# This is the XML-RPC implementation, see the README in Bugzilla/WebService/.
# Our "base" implementation is in Bugzilla::WebService::Server.
- $value = Bugzilla::WebService::Server->datetime_format_outbound($value);
- $value =~ s/-//g;
+ if (defined $value) {
+ $value = Bugzilla::WebService::Server->datetime_format_outbound($value);
+ $value =~ s/-//g;
+ }
+ else {
+ my ($pkg, $file, $line) = caller;
+ my $class = ref $self;
+ ERROR("$class->type($type, undef) called from $pkg ($file line $line)");
+ }
}
elsif ($type eq 'email') {
$type = 'string';