Fixing compatibility bug with non-migrated code from Yii2