On a clean simplytest.me/project/breakpoints install we delete all but the 1x multiplier. Now when trying to create a breakpoint, on form submit the following notice and warning appear:
Notice: Undefined index: multipliers in breakpoints_admin_breakpoints_submit() (line 482 of /home/se93d0a0820604d3/www/sites/default/modules/breakpoints/breakpoints.admin.inc).
Warning: array_filter() expects parameter 1 to be array, null given in breakpoints_breakpoint_save() (line 466 of /home/se93d0a0820604d3/www/sites/default/modules/breakpoints/breakpoints.module).
Or even worse, when you later on remove all multipliers but 1x and try to add / alter breakpoints, a white PHP error screen appears with:
Fatal error: Unsupported operand types in /home/se93d0a0820604d3/www/sites/default/modules/breakpoints/breakpoints.module on line 468
This is due the fact that breakpoints_admin_breakpoints() in breakpoints.admin.inc removes the 1x multiplier by default and leaves us with an empty set of multiplier checkboxes which cannot be processed on form submit. The 1x multiplier also seems to be removed in other functions.
The quickest workaround is to add an unused multiplier.
| Comment | File | Size | Author |
|---|---|---|---|
| #3 | breakpoints-2210159-3.patch | 2.98 KB | Anonymous (not verified) |
Comments
Comment #1
attiks commentedcan you provide a patch to fix it?
Comment #2
lmeurs commentedI am afraid not, sorry, I am not familiar with this module.
Comment #3
Anonymous (not verified) commentedbreakpoints_admin_breakpoints()removes the 1.x checkboxes from the form - this should re-create the 1x multiplier when saving the form data.Hope this works - bear with me, my first effort at creating a patch.
Comment #4
attiks commentedComment #5
jelle_sFixed in latest dev. Thanks for the patch!
Comment #6
jelle_s