mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02:00
BUG fieldNameError() references invalid $this->form
FieldList references `$this->form` which doesn't exist from what I can see. I presume this should have been `$field->getForm()`. However, please note that I came across this when looking for something unrelated and haven't tested this PR.
This commit is contained in:
parent
66fa597b3b
commit
f1e5c72e43
@ -155,11 +155,11 @@ class FieldList extends ArrayList
|
||||
*/
|
||||
protected function fieldNameError(FormField $field, $functionName)
|
||||
{
|
||||
if ($this->form) {
|
||||
if ($field->getForm()) {
|
||||
$errorSuffix = sprintf(
|
||||
" in your '%s' form called '%s'",
|
||||
get_class($this->form),
|
||||
$this->form->getName()
|
||||
get_class($field->getForm()),
|
||||
$field->getForm()->getName()
|
||||
);
|
||||
} else {
|
||||
$errorSuffix = '';
|
||||
|
Loading…
Reference in New Issue
Block a user