]> git.ipfire.org Git - thirdparty/bugzilla.git/commitdiff
Bug 1159582: All api responses have unnecessary 'result'
authorByron Jones <glob@mozilla.com>
Wed, 29 Apr 2015 07:46:12 +0000 (15:46 +0800)
committerByron Jones <glob@mozilla.com>
Wed, 29 Apr 2015 07:46:12 +0000 (15:46 +0800)
r=wicked,a=glob

Bugzilla/WebService/Server/REST.pm

index cefebd65d118cd856d23a09f3c51c59107cdd3d0..8450a7a284b02f2862cfb5e4b547e6ea0cdeb309 100644 (file)
@@ -134,8 +134,7 @@ sub response {
     # and not a undefined or scalar value.
     if (!ref $result
         || blessed($result)
-        || ref $result ne 'HASH'
-        || ref $result ne 'ARRAY')
+        || (ref $result ne 'HASH' && ref $result ne 'ARRAY'))
     {
         $result = { result => $result };
     }