我制作了一个电报机器人,它在我们的电报聊天中记录了严重错误。该机器人已在另一个 symfony 应用程序 (4.4) 中使用,并且运行良好。
但是现在我试图在 Symfony 3.4 项目中使用它,并且在生成错误时,电报响应为:
resulted in a `400 Bad Request` response:
{"ok":false,"error_code":400,"description":"Bad Request: can't parse entities: Can't find end of the entity starting at (truncated...)
Run Code Online (Sandbox Code Playgroud)
但是,将parse_modefrom更改Markdown为HTML解决了该问题,但我正试图弄清楚为什么会这样。
这是我要发送的字符串:
$message = "$user just had an error at: $path\n`$error`\n$file:$line";
Run Code Online (Sandbox Code Playgroud)
这是发送请求的函数:
resulted in a `400 Bad Request` response:
{"ok":false,"error_code":400,"description":"Bad Request: can't parse entities: Can't find end of the entity starting at (truncated...)
Run Code Online (Sandbox Code Playgroud)
提前致谢