Fixing the issue #3292

This change fixes the issue #3292. The details were mentioned in the comments to the issue.
Merge branch 'patch-2' of github.com:it3rmit/yii2 into it3rmit-patch-2
Fixes #3292: Fixed dropdown widgets rendering incorrect HTML