From 2b8b9a5c27e72993b86054fec7167706fdb470f3 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?C=C3=B4me=20Chilliet?= <come.chilliet@fusiondirectory.org>
Date: Thu, 22 Oct 2020 15:51:37 +0200
Subject: [PATCH] :ambulance: fix(objects) objects::delete should return errors

issue #6119
---
 include/class_objects.inc | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/include/class_objects.inc b/include/class_objects.inc
index fb7127963..988be1300 100644
--- a/include/class_objects.inc
+++ b/include/class_objects.inc
@@ -400,10 +400,10 @@ class objects
     return static::open('new', $type);
   }
 
-  static function delete (string $dn, string $type, bool $checkAcl = TRUE)
+  static function delete (string $dn, string $type, bool $checkAcl = TRUE): array
   {
     $tabObject = static::open($dn, $type);
-    $tabObject->delete($checkAcl);
+    return $tabObject->delete($checkAcl);
   }
 
   static function createTemplate (string $type): simpleTabs
-- 
GitLab