Quellcode durchsuchen

Moved the initialization of the default \Predis\ResponseReader instance.

Daniele Alessandri vor 15 Jahren
Ursprung
Commit
8ae5197a38
1 geänderte Dateien mit 1 neuen und 1 gelöschten Zeilen
  1. 1 1
      lib/Predis.php

+ 1 - 1
lib/Predis.php

@@ -30,7 +30,6 @@ class Client {
     private $_options, $_connection, $_serverProfile, $_responseReader;
 
     public function __construct($parameters = null, $clientOptions = null) {
-        $this->_responseReader = new ResponseReader();
         $this->setupClient($clientOptions ?: new ClientOptions());
         $this->setupConnection($parameters);
     }
@@ -75,6 +74,7 @@ class Client {
     }
 
     private function setupClient($options) {
+        $this->_responseReader = new ResponseReader();
         $this->_options = self::filterClientOptions($options);
 
         $this->setProfile($this->_options->profile);