Skip to content

Commit ac3502b

Browse files
authored
Merge pull request #3 from iBobik/patch-1
#1: Allow connect by socketfile
2 parents 9014d18 + a8e2f8a commit ac3502b

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

src/functions.php

+6-1
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,12 @@ function sendMemcacheCommands($command){
4444
$result = array();
4545

4646
foreach($GLOBALS['MEMCACHE_SERVERS'] as $server){
47-
list($host, $port) = explode(':', $server);
47+
if ( strstr($server, 'unix:') === false ){
48+
list($host, $port) = explode(':', $server);
49+
} else {
50+
$host=$server;
51+
$port=-1;
52+
}
4853
$result[$server] = sendMemcacheCommand($host,$port,$command);
4954
}
5055
return $result;

0 commit comments

Comments
 (0)