Skip to content

Commit 439e096

Browse files
authored
Merge pull request #30 from line/fix/base_uri_handling
Fix the handling to specify endpoint base URI
2 parents a86c3de + d624fca commit 439e096

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

src/LINEBot.php

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,8 +51,11 @@ public function __construct(HTTPClient $httpClient, array $args)
5151
{
5252
$this->httpClient = $httpClient;
5353
$this->channelSecret = $args['channelSecret'];
54-
$this->endpointBase =
55-
array_key_exists('endpointBase', $args) && $args['endpointBase'] ?: LINEBot::DEFAULT_ENDPOINT_BASE;
54+
55+
$this->endpointBase = LINEBot::DEFAULT_ENDPOINT_BASE;
56+
if (array_key_exists('endpointBase', $args) && !empty($args['endpointBase'])) {
57+
$this->endpointBase = $args['endpointBase'];
58+
}
5659
}
5760

5861
/**

0 commit comments

Comments
 (0)