Commit db586d97 authored by Vincent Bouffard's avatar Vincent Bouffard Committed by Pierre.R
Browse files

Issue #2481249 by CloneVince: Wrong database selected

parent c781cdd8
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -18,7 +18,7 @@ class Redis_Client_PhpRedis implements Redis_Client_FactoryInterface {
      $client->auth($options['password']);
    }

    if (isset($options['database'])) {
    if (isset($options['base'])) {
      $client->select($options['base']);
    }

+4 −0
Original line number Diff line number Diff line
@@ -108,6 +108,10 @@ class Redis_Client_Predis implements Redis_Client_FactoryInterface {

    $client = new \Predis\Client($options);

    if (isset($options['base']) && 0 !== $options['base']) {
        $client->select((int)$options['base']);
    }

    return $client;
  }