Skip to content
This repository has been archived by the owner on Feb 7, 2025. It is now read-only.

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 subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

1 participant