Latest update throws error, crashes database updates. Don't know if anyone else has experienced this, as I could not find a comparable issue. If this is a duplicate, my apologies.
[notice] Update started: checklistapiexample_update_8101
[error] TypeError: Argument 1 passed to Drupal\checklistapi\Storage\StateStorage::setSavedProgress() must be of the type array, null given
...
web/modules/contrib/checklistapi/checklistapiexample/checklistapiexample.install on line 33 in web/modules/contrib/checklistapi/src/Storage/StateStorage.php on line 39
As I am only testing this module for a project, and not using it actively, I uninstalled checklistapi so I could complete other modules' database updates.
| Comment | File | Size | Author |
|---|---|---|---|
| #4 | checklistapi-3042638-4.patch | 657 bytes | traviscarden |
Comments
Comment #2
ccshannon commentedComment #3
ccshannon commentedThis statement returns NULL and should be converted to an empty array in that instance.
Comment #4
traviscarden commentedThank you for the report, @ccshannon. I'm guessing you didn't have any saved progress on the example checklist at the time you ran database updates, resulting in a case I failed to guard against. I think the attached patch would solve the problem. Please let me know if you find otherwise.
Comment #5
ccshannon commentedThanks, @TravisCarden!
I added the patch in #4. I re-imported the database with the old version enabled (the database that had no saved progress), re-ran updates, and works like a charm!
All good. Much appreciated! :)
Comment #6
traviscarden commentedGreat. Thanks for testing, @ccshannon! Committed.