Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit f1f83b9

Browse filesBrowse files
author
Vasilij Dusko | CREATION
committed
* LightSmsTransport.php - use query string parameters
1 parent 026dcd9 commit f1f83b9
Copy full SHA for f1f83b9

File tree

1 file changed

+9
-3
lines changed
Filter options

1 file changed

+9
-3
lines changed

‎src/Symfony/Component/Notifier/Bridge/LightSms/LightSmsTransport.php

Copy file name to clipboardExpand all lines: src/Symfony/Component/Notifier/Bridge/LightSms/LightSmsTransport.php
+9-3Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ public function __construct(string $login, string $password, string $from, HttpC
8686

8787
public function __toString(): string
8888
{
89-
return sprintf('lightsms://%s/external/get/send.php?from=%s', $this->getEndpoint(), $this->from);
89+
return sprintf('lightsms://%s?from=%s', $this->getEndpoint(), $this->from);
9090
}
9191

9292
public function supports(MessageInterface $message): bool
@@ -109,9 +109,15 @@ protected function doSend(MessageInterface $message): SentMessage
109109
'timestamp' => $timestamp,
110110
];
111111
$data['signature'] = $this->generateSignature($data, $timestamp);
112-
$endpoint = 'https://'.$this->getEndpoint().'/external/get/send.php?'.http_build_query($data);
113112

114-
$response = $this->client->request('GET', $endpoint);
113+
$endpoint = sprintf('https://%s/external/get/send.php', $this->getEndpoint());
114+
$response = $this->client->request(
115+
'GET',
116+
$endpoint,
117+
[
118+
'query' => $data,
119+
]
120+
);
115121

116122
if (Response::HTTP_OK !== $response->getStatusCode()) {
117123
throw new TransportException('Unable to send the SMS', $response);

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.