BUGFIX: test that the class exists before running subclass tests

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.4@101631 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
Geoff Munn 2010-03-24 21:31:07 +00:00 committed by Sam Minnee
parent 89c7430600
commit fcfd9e15a1

View File

@ -1382,7 +1382,9 @@ class SiteTree extends DataObject implements PermissionProvider,i18nEntityProvid
foreach($allFields as $field => $fieldSpec) {
if(preg_match('/([^(]+)/', $fieldSpec, $matches)) {
$class = $matches[0];
if($class == 'HTMLText' || is_subclass_of($class, 'HTMLText')) $htmlFields[] = $field;
if(class_exists($class)){
if($class == 'HTMLText' || is_subclass_of($class, 'HTMLText')) $htmlFields[] = $field;
}
}
}