@@ -196,7 +196,8 @@ public static function createConnection($servers, array $options = array())
196196 *
197197 * @param $key
198198 */
199- private static function encodeKey ($ key ) {
199+ private static function encodeKey ($ key )
200+ {
200201return rawurlencode ($ key );
201202 }
202203
@@ -210,9 +211,9 @@ protected function doSave(array $values, $lifetime)
210211 }
211212
212213if ($ this ->isTextProtocol ) {
213- $ encoded_values =[] ;
214- $ keyEncoder =[ static ::class,'encodeKey ' ] ;
215- array_walk ($ values ,function ($ value ,$ key )use (&$ encoded_values ,$ keyEncoder ) {$ encoded_values [$ keyEncoder ($ key )] =$ value ; });
214+ $ encoded_values =array () ;
215+ $ keyEncoder =array ( static ::class,'encodeKey ' ) ;
216+ array_walk ($ values ,function ($ value ,$ key )use (&$ encoded_values ,$ keyEncoder ) {$ encoded_values [$ keyEncoder ($ key )] =$ value ; });
216217$ values =$ encoded_values ;
217218 }
218219
@@ -227,9 +228,10 @@ protected function doFetch(array $ids)
227228$ unserializeCallbackHandler =ini_set ('unserialize_callback_func ' ,__CLASS__ .'::handleUnserializeCallback ' );
228229try {
229230if ($ this ->isTextProtocol ) {
230- $ keyEncoder =[ static ::class,'encodeKey ' ] ;
231+ $ keyEncoder =array ( static ::class,'encodeKey ' ) ;
231232$ ids =array_map ($ keyEncoder ,$ ids );
232233 }
234+
233235return $ this ->checkResultCode ($ this ->getClient ()->getMulti ($ ids ));
234236 }catch (\Error $ e ) {
235237throw new \ErrorException ($ e ->getMessage (),$ e ->getCode (),E_ERROR ,$ e ->getFile (),$ e ->getLine ());
@@ -299,6 +301,7 @@ private function getClient()
299301
300302$ this ->client =$ this ->lazyClient ;
301303$ this ->isTextProtocol = !$ this ->client ->getOption (\Memcached::OPT_BINARY_PROTOCOL );
304+
302305return $ this ->client ;
303306 }
304307}