mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 12:05:37 +00:00
BUG Fix minor accessors of legacy ->class property
This commit is contained in:
parent
29f450b1e1
commit
0cd40ca6e5
@ -109,7 +109,8 @@ class FieldList extends ArrayList
|
|||||||
$name = $field->getName();
|
$name = $field->getName();
|
||||||
if (isset($list[$name])) {
|
if (isset($list[$name])) {
|
||||||
if ($this->form) {
|
if ($this->form) {
|
||||||
$errSuffix = " in your '{$this->form->class}' form called '" . $this->form->Name() . "'";
|
$formClass = get_class($this->form);
|
||||||
|
$errSuffix = " in your '{$formClass}' form called '" . $this->form->Name() . "'";
|
||||||
} else {
|
} else {
|
||||||
$errSuffix = '';
|
$errSuffix = '';
|
||||||
}
|
}
|
||||||
|
@ -8,7 +8,6 @@ use SilverStripe\ORM\ArrayList;
|
|||||||
use SilverStripe\ORM\DataObject;
|
use SilverStripe\ORM\DataObject;
|
||||||
use SilverStripe\ORM\DataObjectInterface;
|
use SilverStripe\ORM\DataObjectInterface;
|
||||||
use SilverStripe\ORM\FieldType\DBHTMLText;
|
use SilverStripe\ORM\FieldType\DBHTMLText;
|
||||||
use SilverStripe\View\Requirements;
|
|
||||||
use SilverStripe\View\ViewableData;
|
use SilverStripe\View\ViewableData;
|
||||||
use stdClass;
|
use stdClass;
|
||||||
|
|
||||||
@ -167,8 +166,12 @@ class TreeMultiselectField extends TreeDropdownField
|
|||||||
$fieldName = $this->name;
|
$fieldName = $this->name;
|
||||||
$saveDest = $record->$fieldName();
|
$saveDest = $record->$fieldName();
|
||||||
if (!$saveDest) {
|
if (!$saveDest) {
|
||||||
user_error("TreeMultiselectField::saveInto() Field '$fieldName' not found on"
|
$recordClass = get_class($record);
|
||||||
. " $record->class.$record->ID", E_USER_ERROR);
|
user_error(
|
||||||
|
"TreeMultiselectField::saveInto() Field '$fieldName' not found on"
|
||||||
|
. " {$recordClass}.{$record->ID}",
|
||||||
|
E_USER_ERROR
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($this->value) {
|
if ($this->value) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user