From 0aeb5d696b572b47e3f4767b4bd811b6ffeb45dd Mon Sep 17 00:00:00 2001 From: Roland Gruber Date: Mon, 5 Sep 2022 21:07:31 +0200 Subject: [PATCH] fixed exception --- lam/lib/baseType.inc | 3 +++ lam/lib/types.inc | 5 ++++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/lam/lib/baseType.inc b/lam/lib/baseType.inc index 15265f359..92b1d0e70 100644 --- a/lam/lib/baseType.inc +++ b/lam/lib/baseType.inc @@ -104,6 +104,9 @@ class baseType { $descriptions = array(); foreach ($this->getType()->getModules() as $moduleName) { $module = moduleCache::getModule($moduleName, $this->getScope()); + if ($module === null) { + continue; + } $descriptions = array_merge($descriptions, $module->getListAttributeDescriptions($this->getType())); } return $descriptions; diff --git a/lam/lib/types.inc b/lam/lib/types.inc index 986cdbd5c..d9fb4f478 100644 --- a/lam/lib/types.inc +++ b/lam/lib/types.inc @@ -293,7 +293,10 @@ class ConfiguredType { */ public function getModules() { $typeSettings = $this->typeManager->getConfig()->get_typeSettings(); - $modules = !empty($typeSettings['modules_' . $this->getId()]) ? $typeSettings['modules_' . $this->getId()] : ''; + if (empty($typeSettings['modules_' . $this->getId()])) { + return array(); + } + $modules = $typeSettings['modules_' . $this->getId()]; return explode(',', $modules); }