]> git.donarmstrong.com Git - debbugs.git/blobdiff - cgi/soap.cgi
assume unknown encodings are UTF-8
[debbugs.git] / cgi / soap.cgi
index 53f7368536f4327b4a71b60acd59a9ce811250d8..261042b0a88c5731ab3c35d9d93df704d550bca0 100755 (executable)
@@ -28,7 +28,12 @@ my $soap = Debbugs::SOAP::Server
 # kill off all of the date/time related bits in the serializer.
 my $typelookup = $soap->serializer()->{_typelookup};
 for my $key (keys %{$typelookup}) {
-     delete $typelookup->{$key} if defined $key and $key =~ /Month|Day|Year|date|time|duration/i;
+    if (defined $key and
+        $key =~ /Month|Day|Year|date|time|duration/i
+       ) {
+        # set the sub to always return 0
+        $typelookup->{$key}[1] = sub { 0 };
+    }
 }
 
 our $warnings = '';