Skip to content

Commit abefba7

Browse files
authored
update Client (#130)
1 parent 7cdad26 commit abefba7

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

src/Qcloud/Cos/Client.php

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222

2323

2424
class Client extends GuzzleClient {
25-
const VERSION = '2.0.2';
25+
const VERSION = '2.0.3';
2626

2727
private $httpCilent;
2828
private $api;
@@ -252,12 +252,16 @@ public function doesObjectExist($bucket, $key, array $options = array())
252252
return False;
253253
}
254254
}
255-
255+
256256
public static function explodeKey($key) {
257+
257258
// Remove a leading slash if one is found
258259
$split_key = explode('/', $key && $key[0] == '/' ? substr($key, 1) : $key);
259260
// Remove empty element
260-
$split_key = array_filter($split_key);
261+
262+
$split_key = array_filter($split_key, function($var) {
263+
return !($var == '' || $var == null);
264+
});
261265
return implode("/", $split_key);
262266
}
263267

0 commit comments

Comments
 (0)