Skip to content

Commit

Permalink
if auth is null ignore them
Browse files Browse the repository at this point in the history
If you send options array with auth key and value is a null ignore them.
fixing phalcon#12736
  • Loading branch information
Daredzik authored Apr 21, 2017
1 parent 47b2335 commit dafcd27
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion phalcon/cache/backend/redis.zep
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,10 @@ class Redis extends Backend
let options["persistent"] = false;
}

if !isset options["auth"] {
let options["auth"] = "";
}

if !isset options["statsKey"] {
// Disable tracking of cached keys per default
let options["statsKey"] = "";
Expand Down Expand Up @@ -124,7 +128,7 @@ class Redis extends Backend
throw new Exception("Could not connect to the Redisd server ".host.":".port);
}

if fetch auth, options["auth"] {
if fetch auth, options["auth"] && !empty options["auth"] {
let success = redis->auth(auth);

if !success {
Expand Down

0 comments on commit dafcd27

Please sign in to comment.