You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
所以希望当没有配置database时,默认为null
want in Connection.php
line70 public $database = null;
line290 if ($this->database !== null){
$this->executeCommand('SELECT', [$this->database]);
}
but now in Connection.php
line70 public $database = 0;
line290 $this->executeCommand('SELECT', [$this->database]);
Additional info
Q
A
Yii 2
PHP version 7.1.11
Operating system centos 6.3
The text was updated successfully, but these errors were encountered:
emmayliu01
changed the title
Yii2-redis when we do not need select database, will bu wrong
Yii2-redis when we do not need select database, will be wrong
May 7, 2018
default redis setup does not require SELECT, so the default of null is fine. if your environment requires SELECT, just configure the DB to be different from null.
but now in Connection.php, the program must run the line 290 $this->executeCommand('SELECT', [$this->database]); when we do not require SELECT database, it will throw Database Exception. The current code is not supported if we do not require SELECT database. Will the code support the database default is null in the future?
What steps will reproduce the problem?
当使用某些公司内部redis服务时,是通过bns来获取连接的ip,并不需要select database,这样会报错
What's expected?
所以希望当没有配置database时,默认为null
want in Connection.php
line70 public $database = null;
line290 if ($this->database !== null){
$this->executeCommand('SELECT', [$this->database]);
}
but now in Connection.php
line70 public $database = 0;
line290 $this->executeCommand('SELECT', [$this->database]);
Additional info
The text was updated successfully, but these errors were encountered: