我的 php 腳本有問題。 (我和我的朋友寫這篇文章,對錯誤表示歉意) 這是向我展示的錯誤:致命錯誤:未捕獲 InvalidArgumentException:json_decode 錯誤: 語法錯誤在 /opt/html/wordpress_eagle/forums/vendor/guzzlehttp/guzzle/src/functions.php:306堆棧跟蹤:#0 /opt/html/wordpress_eagle/forums/vendor/restcord/restcord/src/DiscordClient.php(229): GuzzleHttp\json_decode('')#1 /opt/html/wordpress_eagle/forums/vendor/restcord/restcord/src/DiscordClient.php(184): RestCord\DiscordClient->convertResponseToResult('guild', Array, 對象(GuzzleHttp\Psr7\Response),對象(GuzzleHttp\Command\Command))#2 /opt/html/wordpress_eagle/forums/vendor/guzzlehttp/command/src/ServiceClient.php(215): RestCord\DiscordClient->RestCord{closure}(對象(GuzzleHttp\Psr7\Response), 對象(GuzzleHttp\Psr7\Request),對象(GuzzleHttp\Command\Command))#3 /opt/html/wordpress_eagle/forums/vendor/guzzlehttp/command/src/ServiceClient.php(177): GuzzleHttp\Command\ServiceClient->transformResponseToResult(Object(GuzzleHttp\Psr7\Response), 對象(GuzzleHttp\Psr7\Request),對象(GuzzleHttp\Command\Command))#4 [內部函數]:/opt/html/wordpress_eagle/forums/vendor/guzzlehttp/command/src/Exception/CommandException.php 中的 GuzzleHtt 第 57 行這是 json_decode 拋出錯誤 GuzzleHttp/src/functions.php 的地方: https://github.com/guzzle/guzzle/blob/4.1.0/src/functions.php#L305* * @param string $json JSON data to parse * @param bool $assoc When true, returned objects will be converted * into associative arrays. * @param int $depth User specified recursion depth. * @param int $options Bitmask of JSON decode options. * * @return mixed * @throws \InvalidArgumentException if the JSON cannot be decoded. * @link http://www.php.net/manual/en/function.json-decode.php */
- 1 回答
- 0 關注
- 191 瀏覽
添加回答
舉報
0/150
提交
取消