mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 12:05:37 +00:00
Merge pull request #9905 from christopherdarling/patch-20
BUG fieldNameError() references invalid $this->form
This commit is contained in:
commit
3e85c4dc5c
@ -155,11 +155,11 @@ class FieldList extends ArrayList
|
|||||||
*/
|
*/
|
||||||
protected function fieldNameError(FormField $field, $functionName)
|
protected function fieldNameError(FormField $field, $functionName)
|
||||||
{
|
{
|
||||||
if ($this->form) {
|
if ($field->getForm()) {
|
||||||
$errorSuffix = sprintf(
|
$errorSuffix = sprintf(
|
||||||
" in your '%s' form called '%s'",
|
" in your '%s' form called '%s'",
|
||||||
get_class($this->form),
|
get_class($field->getForm()),
|
||||||
$this->form->getName()
|
$field->getForm()->getName()
|
||||||
);
|
);
|
||||||
} else {
|
} else {
|
||||||
$errorSuffix = '';
|
$errorSuffix = '';
|
||||||
|
Loading…
x
Reference in New Issue
Block a user