added missing { and } after if
Merge branch 'hotfix/#6125-enforcing-braces-in-if-construct-usage'

Close #6125