fix: remove preceding and trailing whitespace from config #40950
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
Create recursive function to remove white space during the writing of the
config/config.php
file. This will remove white space from nested array values as well (hence the recursive function).Related Issue
Motivation and Context
Solves issues with the SMTP server input where if there were white spaces preceding or succeeding the input the connection would error out. Creates a better user experience for the user as sometimes you may not see that you entered a white space either before or after an input.
How Has This Been Tested?
test environment:
Testing Procedure
testSetValue()
test to add white space and the beginning and end of a value and then make sure that the output does not include white space.Screenshots (if appropriate):
SMTP server address with preceding and succeeding spaces.
Saved value in
config/config.php
that has preceding and succeeding white spaces removed.Types of changes
Checklist: