Replace last references to removed HTTPException->httpcode property

This commit is contained in:
Hypolite Petovan 2019-05-02 13:08:06 -04:00
parent ba3cd1334a
commit 08ef4c23d7

View File

@ -364,7 +364,7 @@ function api_call(App $a)
Logger::warning(API_LOG_PREFIX . 'not implemented', ['module' => 'api', 'action' => 'call']); Logger::warning(API_LOG_PREFIX . 'not implemented', ['module' => 'api', 'action' => 'call']);
throw new NotImplementedException(); throw new NotImplementedException();
} catch (HTTPException $e) { } catch (HTTPException $e) {
header("HTTP/1.1 {$e->httpcode} {$e->httpdesc}"); header("HTTP/1.1 {$e->getCode()} {$e->httpdesc}");
return api_error($type, $e); return api_error($type, $e);
} }
} }
@ -384,7 +384,7 @@ function api_error($type, $e)
/// @TODO: https://dev.twitter.com/overview/api/response-codes /// @TODO: https://dev.twitter.com/overview/api/response-codes
$error = ["error" => $error, $error = ["error" => $error,
"code" => $e->httpcode . " " . $e->httpdesc, "code" => $e->getCode() . " " . $e->httpdesc,
"request" => $a->query_string]; "request" => $a->query_string];
$return = api_format_data('status', $type, ['status' => $error]); $return = api_format_data('status', $type, ['status' => $error]);