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

When Editing BREAD "Invalid Parameter number" error occured #5937

Open
h22k opened this issue Dec 17, 2024 · 0 comments
Open

When Editing BREAD "Invalid Parameter number" error occured #5937

h22k opened this issue Dec 17, 2024 · 0 comments

Comments

@h22k
Copy link

h22k commented Dec 17, 2024

Laravel version

11.27.2

PHP version

8.2.26

Voyager version

1.8

Database

Mariadb 10.5.26

Description

Whenever I try to edit exist BREAD, I encountered same error.

SQLSTATE[HY093]: Invalid parameter number (Connection: mysql, SQL: update data_types set details = ?, data_types.updated_at = ? where id = asc)

This is happening because DataType model class is using old mutator & casting system.

Steps to reproduce

  1. Create a BREAD
  2. Go to bread page again
  3. Edit bread
  4. Doesnt matter if you changed something, just submit

Expected behavior

Bread should have been updated normally.

Screenshots

Screenshot 2024-12-17 at 20 04 13

Additional context

I edited DataType model class and turn old style mutators into new sytle and it is fixed.

I will prepare a PR about that.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant