#5937·voyager

When Editing BREAD "Invalid Parameter number" error occured

Author: h22kCreated Dec 17, 2024Updated Dec 17, 2024
Labelspossible bug

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.