Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Default value for 'Mail Method' (settings_how) is incorrect resulting in errors #2431

Closed
netniV opened this issue Feb 19, 2019 · 1 comment
Closed

Comments

@netniV
Copy link
Member

netniV commented Feb 19, 2019

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:

  1. Go to MySQL
  2. Execute `DELETE FROM settings WHERE name = 'settings_how'
  3. Try displaying $mail_methods[read_config_option('settings_how')]
  4. See error in cacti.log

Expected behavior
read_config_option('settings_how') should be returning an index number instead of a name.

netniV added a commit that referenced this issue Feb 19, 2019
Default value is text for which mail method to use, should be integer
@netniV
Copy link
Member Author

netniV commented Feb 19, 2019

This has now been committed to the development code.

@netniV netniV closed this as completed Feb 19, 2019
@netniV netniV changed the title Default value is text for which mail method to use, should be integer Default value for 'Mail Method' (settings_how) is incorrect resulting in errors Feb 24, 2019
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jun 30, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant