From 0d709192006d69b98c99355fc042a2383cbbf8c6 Mon Sep 17 00:00:00 2001 From: Roland Gruber Date: Fri, 10 Aug 2018 20:02:41 +0200 Subject: [PATCH] check if scope class exists --- lam/lib/types.inc | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/lam/lib/types.inc b/lam/lib/types.inc index 4eabd4df..2af02988 100644 --- a/lam/lib/types.inc +++ b/lam/lib/types.inc @@ -1,10 +1,9 @@ config->get_ActiveTypes(); foreach ($activeTypes as $typeId) { - $configuredTypes[] = $this->buildConfiguredType($typeId); + $type = $this->buildConfiguredType($typeId); + if ($type === null) { + continue; + } + $configuredTypes[] = $type; } return $configuredTypes; } @@ -469,6 +472,9 @@ class TypeManager { */ private function buildConfiguredType($typeId) { $scope = getScopeFromTypeId($typeId); + if (!class_exists($scope)) { + return null; + } return new ConfiguredType($this, $scope, $typeId); }