mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02:00
BUGFIX: test that the class exists before running subclass tests (from r101631)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@112012 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
parent
1e860727db
commit
f073c9b60c
@ -1399,9 +1399,11 @@ 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_exists($class)){
|
||||||
if($class == 'HTMLText' || is_subclass_of($class, 'HTMLText')) $htmlFields[] = $field;
|
if($class == 'HTMLText' || is_subclass_of($class, 'HTMLText')) $htmlFields[] = $field;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
$linkedPages = array();
|
$linkedPages = array();
|
||||||
$linkedFiles = array();
|
$linkedFiles = array();
|
||||||
|
Loading…
Reference in New Issue
Block a user