Skip to content

Commit

Permalink
Apply old PR 367
Browse files Browse the repository at this point in the history
  • Loading branch information
danhunsaker committed Dec 11, 2018
1 parent 5253e08 commit 6ff26b9
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions lib/Resque/Redis.php
Original file line number Diff line number Diff line change
Expand Up @@ -113,12 +113,15 @@ public static function prefix($namespace)
public function __construct($server, $database = null, $client = null)
{
try {
if (is_array($server)) {
$this->driver = new Credis_Cluster($server);
}
else if (is_object($client)) {
if (is_object($client)) {
$this->driver = $client;
}
elseif (is_object($server)) {
$this->driver = $server;
}
elseif (is_array($server)) {
$this->driver = new Credis_Cluster($server);
}
else {
list($host, $port, $dsnDatabase, $user, $password, $options) = self::parseDsn($server);
// $user is not used, only $password
Expand Down

0 comments on commit 6ff26b9

Please sign in to comment.