Skip to content
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

Exception Thrown for Arrays #46

Open
ataylor32 opened this issue Nov 22, 2018 · 0 comments
Open

Exception Thrown for Arrays #46

ataylor32 opened this issue Nov 22, 2018 · 0 comments
Assignees
Labels
bug Something isn't working

Comments

@ataylor32
Copy link
Contributor

When I use this code:

{!! Form::text('title', 'Title') !!}

I get this output:

<div class="form-group "><label for="title">Title</label><input type="text" name="title" id="title" class="form-control"></div>

If somebody decides to mess with the HTML using their browser's developer tools, they could change name="title" to name="title[]" and submit the form. If the form doesn't pass validation and the user gets redirected back to the form, the following exception is thrown:

Method NetoJose\Bootstrap4Forms\FormService::__toString() must not throw an exception, caught ErrorException: htmlspecialchars() expects parameter 1 to be string, array given

Granted, this is probably an uncommon scenario, but nevertheless it could happen.

@netojose netojose added the bug Something isn't working label Jan 17, 2019
@netojose netojose self-assigned this Jan 17, 2019
@netojose netojose pinned this issue Jan 17, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants