mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-09-04 16:51:25 +02:00
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:
parent
89c7430600
commit
fcfd9e15a1
@ -1382,7 +1382,9 @@ class SiteTree extends DataObject implements PermissionProvider,i18nEntityProvid
|
|||||||
foreach($allFields as $field => $fieldSpec) {
|
foreach($allFields as $field => $fieldSpec) {
|
||||||
if(preg_match('/([^(]+)/', $fieldSpec, $matches)) {
|
if(preg_match('/([^(]+)/', $fieldSpec, $matches)) {
|
||||||
$class = $matches[0];
|
$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;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user