diff --git a/.travis.yml b/.travis.yml index 82668dd9..046dcf43 100644 --- a/.travis.yml +++ b/.travis.yml @@ -30,6 +30,8 @@ matrix: env: DB=MYSQL PDO=1 - php: 5.6 env: DB=MYSQL BEHAT_TEST=1 + - php: 7.0 + env: DB=MYSQL PDO=1 before_script: - composer self-update || true diff --git a/code/controllers/ContentController.php b/code/controllers/ContentController.php index d609be57..e9750b4a 100755 --- a/code/controllers/ContentController.php +++ b/code/controllers/ContentController.php @@ -1,4 +1,8 @@ owner->db(); $htmlFields = array(); foreach($allFields as $field => $fieldSpec) { - if(preg_match('/([^(]+)/', $fieldSpec, $matches)) { - $class = $matches[0]; - if(class_exists($class)){ - if($class == 'HTMLText' || is_subclass_of($class, 'HTMLText')) $htmlFields[] = $field; - } + $fieldObj = $this->owner->dbObject($field); + if($fieldObj instanceof DBHTMLText) { + $htmlFields[] = $field; } } diff --git a/tests/model/VirtualPageTest.php b/tests/model/VirtualPageTest.php index c507ca8c..89633e50 100644 --- a/tests/model/VirtualPageTest.php +++ b/tests/model/VirtualPageTest.php @@ -1,5 +1,7 @@ XML()); }