Commit 68acdec2 authored by Jack'lul's avatar Jack'lul

Simplification (by @noplanman)

parent 0348c3a3
...@@ -194,11 +194,7 @@ class Botan ...@@ -194,11 +194,7 @@ class Botan
$responseData = json_decode($result, true); $responseData = json_decode($result, true);
if ($responseData['status'] !== 'accepted') { if ($responseData['status'] !== 'accepted') {
if (!empty($result)) { TelegramLog::debug('Botan.io stats report failed: ' . ($result ?: 'empty response') . "\n\n");
TelegramLog::debug("Botan.io stats report failed: $result\n\n");
} else {
TelegramLog::debug("Botan.io stats report failed: empty response!\n\n");
}
return false; return false;
} }
...@@ -247,11 +243,7 @@ class Botan ...@@ -247,11 +243,7 @@ class Botan
BotanDB::insertShortUrl($user_id, $url, $result); BotanDB::insertShortUrl($user_id, $url, $result);
return $result; return $result;
} else { } else {
if (!empty($result)) { TelegramLog::debug('Botan.io URL shortening failed for \'' . $url . '\': ' . ($result ?: 'empty response') . "\n\n");
TelegramLog::debug("Botan.io URL shortening failed for '$url': $result\n\n");
} else {
TelegramLog::debug("Botan.io URL shortening failed for '$url': empty response!\n\n");
}
return $url; return $url;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment