From 794ddd026753ff917eb46650c94f16327664dfbf Mon Sep 17 00:00:00 2001 From: Terence Eden Date: Tue, 9 May 2023 09:59:05 +0100 Subject: [PATCH] Better error handling Fixes #9 --- Mastodon.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Mastodon.php b/Mastodon.php index 09b442e..a5d5873 100644 --- a/Mastodon.php +++ b/Mastodon.php @@ -37,7 +37,7 @@ $reply = curl_exec($ch); if (!$reply) { - return json_encode(['ok'=>false, 'curl_error_code' => curl_errno($ch_status), 'curl_error' => curl_error(ch_status)]); + return json_encode(['ok'=>false, 'curl_error_code' => curl_errno($ch), 'curl_error' => curl_error($ch)]); } curl_close($ch);