- Issue created by @Liam Morland
- Merge request !75Issue #3490052: Make book_type_is_allowed() robust against allowed_types not being set β (Closed) created by Liam Morland
- π¨π¦Canada Liam Morland Ontario, CA π¨π¦
The merge request has a partial fix, fixing
book_type_is_allowed()
. - πΊπΈUnited States smustgrave
I tried replicating on a fresh install with 2.0.x branch of book and not able to replicate.
Maybe need clearer steps for triggering it.
- π¨π¦Canada Liam Morland Ontario, CA π¨π¦
I don't know how we ended-up in this situation. It is clear from the code that this would happen anytime that
allowed_types
is not an array. People could end up like this by setting it to null or to a string. - πΊπΈUnited States smustgrave
Attitude isn't needed and will only delay this issue. How are you setting it to null, maybe write a functional test case to show the problem
- π¨π¦Canada Liam Morland Ontario, CA π¨π¦
allowed_types
could have been set to something other than an array using Drush. Someone could do this if they want to make it empty but don't realize that it needs to be an empty array and not NULL. It could also happen if a config import is not setup correctly.The proposed change is designed to make it so that it doesn't matter if
allowed_types
is not an array. No error will be created. - πΊπΈUnited States smustgrave
Bad drush command not sure counts. If it can replicated via a workflow letβs add test coverage