From 3ca1cd334579ff2288067ca6fc0fd7c0a7cb1434 Mon Sep 17 00:00:00 2001 From: Michael Date: Sun, 31 Oct 2021 05:31:58 +0000 Subject: [PATCH] Use getter function --- include/api.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/include/api.php b/include/api.php index b6869a2b13..6a00268b04 100644 --- a/include/api.php +++ b/include/api.php @@ -386,11 +386,11 @@ function api_call(App $a, App\Arguments $args = null) */ function api_error($type, $e, App\Arguments $args) { - $error = ($e->getMessage() !== "" ? $e->getMessage() : $e->httpdesc); + $error = ($e->getMessage() !== "" ? $e->getMessage() : $e->getDescription()); /// @TODO: https://dev.twitter.com/overview/api/response-codes $error = ["error" => $error, - "code" => $e->getCode() . " " . $e->httpdesc, + "code" => $e->getCode() . " " . $e->getDescription(), "request" => $args->getQueryString()]; $return = api_format_data('status', $type, ['status' => $error]);