Skip to content

Commit d624fca

Browse files
committed
Fix the handling to specify endpoint base URI
1 parent 99090b1 commit d624fca

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)