Fixes #15229: Fixed yii\console\widgets\Table default value for getScreenWidth(), when Console::getScreenSize() can't determine screen size

This commit is contained in:
webleaf
2017-11-28 09:14:59 +03:00
committed by Alexander Makarov
parent e9f57b9e7e
commit aab86eb7e7
2 changed files with 5 additions and 0 deletions

View File

@ -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)

View File

@ -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;