Skip to content

Commit

Permalink
Checking existance for password only for AUTH
Browse files Browse the repository at this point in the history
As suggested by @rob006, existance "password" value is enough to go for AUTH, if username supplied, it will go with both username and password

Co-authored-by: Robert Korulczyk <[email protected]>
  • Loading branch information
arfeen and rob006 authored Oct 6, 2024
1 parent 4905a05 commit e2fd687
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions framework/caching/CRedisCache.php
Original file line number Diff line number Diff line change
Expand Up @@ -101,8 +101,8 @@ protected function connect()
{
if($this->ssl)
stream_socket_enable_crypto($this->_socket,true,STREAM_CRYPTO_METHOD_TLS_CLIENT);
if($this->password!==null || $this->username!==null){
if(isset($this->username))
if($this->password!==null){
if($this->username!==null)
$this->executeCommand('AUTH',array($this->username, $this->password));
else
$this->executeCommand('AUTH',array($this->password));
Expand Down

0 comments on commit e2fd687

Please sign in to comment.