mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02:00
BUGFIX Making less assumptions about object structure in FieldSet->addFieldToTab() error messages
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@64007 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
parent
950560e188
commit
18855687fc
@ -230,7 +230,8 @@ class FieldSet extends DataObjectSet {
|
||||
$currentPointer = new Tab($part);
|
||||
$parentPointer->push($currentPointer);
|
||||
} else {
|
||||
user_error("FieldSet::addFieldToTab() Tried to add a tab to object '{$parentPointer->class}.{$parentPointer->Name()}' - '$part' didn't exist.", E_USER_ERROR);
|
||||
$withName = ($parentPointer->hasMethod('Name')) ? " named {$parentPointer->Name()}" : null;
|
||||
user_error("FieldSet::addFieldToTab() Tried to add a tab to object '{$parentPointer->class}{$withName}' - '$part' didn't exist.", E_USER_ERROR);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user