Browse Source

Ensure return type is consistent (list vs object)

jkellerer 3 years ago
parent
commit
f4dc01d1ec
1 changed files with 2 additions and 1 deletions
  1. 2 1
      data/web/json_api.php

+ 2 - 1
data/web/json_api.php

@@ -991,6 +991,7 @@ if (isset($_GET['query'])) {
 
 
                 if ($tags === null) {
                 if ($tags === null) {
                   $data = mailbox('get', 'mailbox_details', $object);
                   $data = mailbox('get', 'mailbox_details', $object);
+                  process_get_return($data);
                 } else {
                 } else {
                   $mailboxes = mailbox('get', 'mailboxes', $object, $tags);
                   $mailboxes = mailbox('get', 'mailboxes', $object, $tags);
                   if (is_array($mailboxes)) {
                   if (is_array($mailboxes)) {
@@ -999,8 +1000,8 @@ if (isset($_GET['query'])) {
                         $data[] = $details;
                         $data[] = $details;
                     }
                     }
                   }
                   }
+                  process_get_return($data, false);
                 }
                 }
-                process_get_return($data);
               break;
               break;
             }
             }
           break;
           break;