RestResultWithObjects : properly init objects array (#231)

This commit is contained in:
Thomas Casteleyn
2022-01-14 11:01:00 +01:00
committed by GitHub
parent 041a938fc0
commit 0940741568

View File

@@ -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()