From 0940741568903cf8ca0258f884cc0ed0025a3f96 Mon Sep 17 00:00:00 2001 From: Thomas Casteleyn Date: Fri, 14 Jan 2022 11:01:00 +0100 Subject: [PATCH] RestResultWithObjects : properly init objects array (#231) --- core/restservices.class.inc.php | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/core/restservices.class.inc.php b/core/restservices.class.inc.php index 518e8a8cd..b2b519401 100644 --- a/core/restservices.class.inc.php +++ b/core/restservices.class.inc.php @@ -135,8 +135,15 @@ class ObjectResult */ class RestResultWithObjects extends RestResult { + /** @var DBObject[] */ public $objects; + public function __construct() + { + parent::__construct(); + $this->objects = array(); + } + /** * Report the given object * @@ -185,6 +192,7 @@ class RestResultWithObjects extends RestResult class RestResultWithRelations extends RestResultWithObjects { + /** @var array */ public $relations; public function __construct()