Skip to content

Commit 700dcf0

Browse files
committed
Fixed missing parameters in memcache driver
1 parent 851d142 commit 700dcf0

File tree

1 file changed

+8
-7
lines changed

1 file changed

+8
-7
lines changed

src/phpFastCache/Drivers/Memcache/Driver.php

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -168,15 +168,16 @@ protected function driverConnect()
168168
} catch (\Exception $e) {
169169
$this->fallback = true;
170170
}
171-
}
172171

173-
/**
174-
* Since Memcached does not throw
175-
* any error if not connected ...
176-
*/
177-
if(!$this->instance->getServerStatus()){
178-
throw new phpFastCacheDriverException('Memcache seems to not be connected');
172+
/**
173+
* Since Memcached does not throw
174+
* any error if not connected ...
175+
*/
176+
if(!$this->instance->getServerStatus(!empty($server[ 'path' ]) ? $server[ 'path' ] : $server[ 'host' ], !empty($server[ 'port' ]) ? $server[ 'port' ] : 0)){
177+
throw new phpFastCacheDriverException('Memcache seems to not be connected');
178+
}
179179
}
180+
180181
return true;
181182
}
182183

0 commit comments

Comments
 (0)