Describe the bug
If a user's php.ini includes spaces in the ini_get('disable_functions') , the plugin will try to use disabled functions, causing PHP Warnings.
To Reproduce
Steps to reproduce the behavior:
Create a php.ini with the following line:
disable_functions = "mail, popen, proc_open, exec, shell_exec, passthru, system"
Enable WP_DEBUG and WP_DEBUG_LOG
Install Total Upkeep
See errors similar to the following:
12-Feb-2021 21:06:38 UTC] PHP Warning: popen() has been disabled for security reasons in /home/jesseo/public_html/support/wp-content/plugins/boldgrid-backup/admin/class-boldgrid-backup-admin-cli.php on line 133
Expected behavior
The function should strip extraneous whitespace from the array of disabled functions for proper matching.
Describe the bug If a user's php.ini includes spaces in the
ini_get('disable_functions')
, the plugin will try to use disabled functions, causing PHP Warnings.To Reproduce Steps to reproduce the behavior:
disable_functions = "mail, popen, proc_open, exec, shell_exec, passthru, system"
12-Feb-2021 21:06:38 UTC] PHP Warning: popen() has been disabled for security reasons in /home/jesseo/public_html/support/wp-content/plugins/boldgrid-backup/admin/class-boldgrid-backup-admin-cli.php on line 133
Expected behavior The function should strip extraneous whitespace from the array of disabled functions for proper matching.
Additional context This issue was reported in the WordPress.org Forums