-
Notifications
You must be signed in to change notification settings - Fork 823
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Form
define $fields
and $actions
as optional but then it throws an error if you don't define them
#8459
Closed
1 task done
Comments
Yeah needs a cheeky |
Cool. Just stumbled into this one too. |
phptek
pushed a commit
to phptek/silverstripe-framework
that referenced
this issue
Dec 18, 2018
phptek
pushed a commit
to phptek/silverstripe-framework
that referenced
this issue
Dec 18, 2018
- Missing conditionals for optional constructor args - Missing guards when form instantiated prior to calling setFields()/setActions()
See PR at #8683 [EDIT] PR now at #8684 (Fixes missing calls to |
phptek
pushed a commit
to phptek/silverstripe-framework
that referenced
this issue
Dec 18, 2018
phptek
pushed a commit
to phptek/silverstripe-framework
that referenced
this issue
Dec 18, 2018
- Missing conditionals for optional constructor args - Missing calls to FieldList::setForm() - Missing guards around naive calls to Form::Fields()->foo()
phptek
pushed a commit
to phptek/silverstripe-framework
that referenced
this issue
Dec 18, 2018
- Missing conditionals for optional constructor args - Missing calls to FieldList::setForm() - Missing guards around naive calls to Form::Fields()->foo()
phptek
pushed a commit
to phptek/silverstripe-framework
that referenced
this issue
Dec 19, 2018
- Missing conditionals for optional constructor args - Missing calls to FieldList::setForm() - Missing guards around naive calls to Form::Fields()->foo()
maxime-rainville
added a commit
that referenced
this issue
Dec 19, 2018
FIX: Fixes #8459 Missing conditionals for optional constructor args
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Form
constructor says it's OK to not specify a$fields
and$actions
and have them default tonull
.However, the first thing it does is try to call
setForm
on our potentiallynull
values. That's not consistent. Also,setFields()
andsetActions()
, do not do thesetForm
call.silverstripe-framework/src/Forms/Form.php
Lines 280 to 290 in 36b1066
Pull Request
The text was updated successfully, but these errors were encountered: