Describe the bug
If the setting 'setting_how' is missing from the settings table, the include/global_settings.php's default value for this is 'PHP Mail() Function' yet uses the $mail_methods in a drop_array style. As such, this is an invalid index against the array and causes issues when later trying to display what method is being used.
To Reproduce
Steps to reproduce the behavior:
- Go to MySQL
- Execute `DELETE FROM settings WHERE name = 'settings_how'
- Try displaying $mail_methods[read_config_option('settings_how')]
- See error in cacti.log
Expected behavior
read_config_option('settings_how') should be returning an index number instead of a name.