diff --git a/framework/CHANGELOG.md b/framework/CHANGELOG.md index e3440973a1..0943a36523 100644 --- a/framework/CHANGELOG.md +++ b/framework/CHANGELOG.md @@ -8,6 +8,7 @@ Yii Framework 2 Change Log - Bug #14276: Fixed I18N format with dotted parameters (developeruz) - Bug #14604: Fixed `yii\validators\CompareValidator` `compareAttribute` does not work if `compareAttribute` form ID has been changed (mikk150) - Bug #15194: Fixed `yii\db\QueryBuilder::insert()` to preserve passed params when building a `INSERT INTO ... SELECT` query for MSSQL, PostgreSQL and SQLite (sergeymakinen) +- Bug #15229: Fixed `yii\console\widgets\Table` default value for `getScreenWidth()`, when `Console::getScreenSize()` can't determine screen size (webleaf) - Bug #15234: Fixed `\yii\widgets\LinkPager` removed `tag` from `disabledListItemSubTagOptions` (SDKiller) - Enh #15135: Automatic completion for help in bash and zsh (Valkeru) - Enh #14662: Added support for custom `Content-Type` specification to `yii\web\JsonResponseFormatter` (Kolyunya) diff --git a/framework/console/widgets/Table.php b/framework/console/widgets/Table.php index 3878c0224a..12cfc1ece4 100644 --- a/framework/console/widgets/Table.php +++ b/framework/console/widgets/Table.php @@ -366,6 +366,7 @@ class Table extends Widget /** * Getting screen width. + * If it is not able to determine screen width, default value `123` will be set. * * @return int screen width */ @@ -376,6 +377,9 @@ class Table extends Widget if (isset($size[0])) { $this->_screenWidth = $size[0]; } + else { + $this->_screenWidth = 123; + } } return $this->_screenWidth;