Fix https://github.com/yiisoft/yii2/issues/2692