From: Vincent Vanwaelscappel Date: Thu, 27 Jun 2019 18:29:02 +0000 (+0200) Subject: #2843 X-Git-Url: http://git.cubedesigners.com/?a=commitdiff_plain;h=1c0b8253b3107db11799c6b7d49d8826b528fe26;p=cubist_cms-back.git #2843 --- diff --git a/src/app/Magic/Fields/Field.php b/src/app/Magic/Fields/Field.php index 40dfbc4..4c9ca0e 100644 --- a/src/app/Magic/Fields/Field.php +++ b/src/app/Magic/Fields/Field.php @@ -84,7 +84,7 @@ class Field implements \ArrayAccess protected static function _getClass($type) { $type = Str::studly($type); - if (class_exists($type)) { + if (class_exists($type) && is_subclass_of($type, self::class)) { return $type; } if (class_exists(__NAMESPACE__ . '\\' . $type)) {