Add Apply Button v0.04 Error

By Steve99 - December 6, 2021

Hello,

Since upgrading to CMSB v3.55 and PHP 8 we've been frequently seeing the following error with the Add Apply Button v0.04 plugin:

UNCAUGHT_EXCEPTION: array_unshift(): Argument #1 ($array) must be of type array, null given
/path/to/web/root/cmsb/plugins/addApplyButton/addApplyButton.php (line 17)
https://www.domainname.com/cmsb/admin.php?menu=tableName&action=edit&num=48

The error has been frequent but occurs randomly so unfortunately I've been unable to identify anything record, or section editor, specific to aid in troubleshooting.

Thoughts on cause and patch? Thanks in advance.

Steve

By daniel - January 4, 2022

Hey Steve,

It just looks like an edge case that was previously failing silently is now causing an exception in PHP 8. I've made an update to the plugin which should prevent the error, and can be downloaded from its plugin page: https://www.interactivetools.com/plugins/add-apply-button/

Let me know if you encounter any more issues!

Thanks,

Daniel
Technical Lead
interactivetools.com

By Steve99 - January 5, 2022

Thanks Daniel!