mirror of
https://github.com/danog/TelegramApiServer.git
synced 2024-11-30 04:19:13 +01:00
Fix php8.1 deprecation notices
This commit is contained in:
parent
9dc3fc208a
commit
afc83e3fb8
@ -85,7 +85,7 @@ abstract class AbstractApiController
|
||||
private function resolveRequest(): \Generator
|
||||
{
|
||||
$query = $this->request->getUri()->getQuery();
|
||||
$contentType = $this->request->getHeader('Content-Type');
|
||||
$contentType = (string)$this->request->getHeader('Content-Type');
|
||||
|
||||
parse_str($query, $get);
|
||||
|
||||
|
@ -115,8 +115,11 @@ class ApiExtensions
|
||||
return true;
|
||||
}
|
||||
|
||||
public function formatMessage(string $message = null, array $entities = []): ?string
|
||||
public function formatMessage(?string $message = null, array $entities = []): ?string
|
||||
{
|
||||
if ($message === null) {
|
||||
return null;
|
||||
}
|
||||
$html = [
|
||||
'messageEntityItalic' => '<i>%s</i>',
|
||||
'messageEntityBold' => '<strong>%s</strong>',
|
||||
|
Loading…
Reference in New Issue
Block a user