Commit 430c60d5 authored by Jack'lul's avatar Jack'lul

Fix error with empty replies (or none)

parent 34ad296b
...@@ -226,7 +226,7 @@ class Request ...@@ -226,7 +226,7 @@ class Request
TelegramLog::update($result); TelegramLog::update($result);
} }
} catch (RequestException $e) { } catch (RequestException $e) {
$result = (string)$e->getResponse()->getBody(); $result = ($e->getResponse()) ? (string) $e->getResponse()->getBody() : '';
} finally { } finally {
//Logging verbose debug output //Logging verbose debug output
TelegramLog::endDebugLogTempStream("Verbose HTTP Request output:\n%s\n"); TelegramLog::endDebugLogTempStream("Verbose HTTP Request output:\n%s\n");
...@@ -265,7 +265,7 @@ class Request ...@@ -265,7 +265,7 @@ class Request
return filesize($file_path) > 0; return filesize($file_path) > 0;
} catch (RequestException $e) { } catch (RequestException $e) {
return (string)$e->getResponse()->getBody(); return ($e->getResponse()) ? (string) $e->getResponse()->getBody() : '';
} finally { } finally {
//Logging verbose debug output //Logging verbose debug output
TelegramLog::endDebugLogTempStream("Verbose HTTP File Download Request output:\n%s\n"); TelegramLog::endDebugLogTempStream("Verbose HTTP File Download Request output:\n%s\n");
......
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