From 5f3be6c7f76580c813f75b6f5f82234c03580686 Mon Sep 17 00:00:00 2001 From: Carsten Brandt Date: Wed, 8 Jan 2014 18:57:47 +0100 Subject: [PATCH] default values for db\Connection username and password to null fixes #1821 --- framework/CHANGELOG.md | 1 + framework/yii/db/Connection.php | 8 ++++---- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/framework/CHANGELOG.md b/framework/CHANGELOG.md index fd00fcd..fa2a660 100644 --- a/framework/CHANGELOG.md +++ b/framework/CHANGELOG.md @@ -68,6 +68,7 @@ Yii Framework 2 Change Log - Chg #1647: Changed the default CSS class of error block to be `error-block` (qiangxue) - Chg #1796: Removed `yii\base\Controller::getActionParams()` (samdark) - Chg #1835: `CheckboxColumn` now renders checkboxes whose values are the corresponding data key values (qiangxue) +- Chg #1821: Changed default values for yii\db\Connection username and password to null (cebe) - Chg: Renamed `yii\jui\Widget::clientEventsMap` to `clientEventMap` (qiangxue) - Chg: Renamed `ActiveRecord::getPopulatedRelations()` to `getRelatedRecords()` (qiangxue) - Chg: Renamed `attributeName` and `className` to `targetAttribute` and `targetClass` for `UniqueValidator` and `ExistValidator` (qiangxue) diff --git a/framework/yii/db/Connection.php b/framework/yii/db/Connection.php index 0fb28ad..4a8571e 100644 --- a/framework/yii/db/Connection.php +++ b/framework/yii/db/Connection.php @@ -118,13 +118,13 @@ class Connection extends Component */ public $dsn; /** - * @var string the username for establishing DB connection. Defaults to empty string. + * @var string the username for establishing DB connection. Defaults to `null` meaning no username to use. */ - public $username = ''; + public $username; /** - * @var string the password for establishing DB connection. Defaults to empty string. + * @var string the password for establishing DB connection. Defaults to `null` meaning no password to use. */ - public $password = ''; + public $password; /** * @var array PDO attributes (name => value) that should be set when calling [[open()]] * to establish a DB connection. Please refer to the