From d81d5f730aed4c52b2b02d0a25af7e476868fe77 Mon Sep 17 00:00:00 2001
From: dockx thibault <thibault.dockx@fusiondirectory.org>
Date: Thu, 18 May 2023 13:45:18 +0000
Subject: [PATCH] :sparkles: Feat(rest) - adds OrderedArrayAttribute

Adds OrderedArrayAttribute as [] instead of string.
---
 webservice/html/rest.php | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/webservice/html/rest.php b/webservice/html/rest.php
index 68649ab563..bd3532d57f 100644
--- a/webservice/html/rest.php
+++ b/webservice/html/rest.php
@@ -580,7 +580,7 @@ class fdRestService extends fdRPCService
       foreach ($section['attrs'] as $attr) {
         if ($object->attrIsReadable($attr)) {
           // Add "" for monovalued attribute or [] for multivalued (only if the class used is SetAttribute)
-          if (get_class($attr) == "SetAttribute") {
+          if (get_class($attr) == "SetAttribute" || get_class($attr) == "OrderedArrayAttribute") {
             $attributes[$attr->getLdapName()] = [];
           } else {
             $attributes[$attr->getLdapName()] = "";
-- 
GitLab