Ensure correct type

[MAILPOET-2535]
This commit is contained in:
Pavel Dohnal
2019-11-19 13:53:59 +01:00
committed by Jack Kitterhing
parent 01f4df87b6
commit 87080c6fe9

View File

@ -34,7 +34,11 @@ class UserFlagsController {
function getAll() { function getAll() {
$this->ensureLoaded(); $this->ensureLoaded();
return array_merge($this->defaults, $this->data); $data = $this->data;
if (!is_array($data)) {
$data = [];
}
return array_merge($this->defaults, $data);
} }
function set($name, $value) { function set($name, $value) {