Closed axeltomasson closed 3 months ago
You have time for a PR, could you add a test, thanks.
@axeltomasson Could you clarify: is this a regression in 2.0.50 or was it also broken in 2.0.49?
@axeltomasson Could you clarify: is this a regression in 2.0.50 or was it also broken in 2.0.49?
2.0.50, broke in https://github.com/yiisoft/yii2/commit/9d3c71d6a712a99f42ae1c5d588312f49514523a#diff-ea76a30d7da4b9fb69fe63d479c0764c4fd9bf99fbb859ba664ff0bc79a6bf8cR839
when booleanTypeLegacy started to return $type directly into $column->type
What steps will reproduce the problem?
Read mssql nvarchar column of a database with db version less then 2017.
In https://github.com/yiisoft/yii2/commit/9d3c71d6a712a99f42ae1c5d588312f49514523a#diff-ea76a30d7da4b9fb69fe63d479c0764c4fd9bf99fbb859ba664ff0bc79a6bf8cR411
The function booleanTypeLegacy sets non abstract column type in last return statement ( for example nvarchar)
What is the expected result?
Read empty string from mssql column of type nvarchar.
What do you get instead?
Read column value is null.
Additional info
One way to fix would be to move function code directly into code where used: