Minor code cleanup.

parent 98aecbc5
...@@ -219,12 +219,12 @@ class Request ...@@ -219,12 +219,12 @@ class Request
} }
// Make sure we have a string to work with. // Make sure we have a string to work with.
if (is_string($input)) { if (!is_string($input)) {
self::$input = $input;
} else {
throw new TelegramException('Input must be a string!'); throw new TelegramException('Input must be a string!');
} }
self::$input = $input;
TelegramLog::update(self::$input); TelegramLog::update(self::$input);
return self::$input; return self::$input;
...@@ -404,6 +404,7 @@ class Request ...@@ -404,6 +404,7 @@ class Request
* Send command * Send command
* *
* @todo Fake response doesn't need json encoding? * @todo Fake response doesn't need json encoding?
* @todo Write debug entry on failure
* *
* @param string $action * @param string $action
* @param array $data * @param array $data
......
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