Fixing TelegramObject constructor issue

* Fix issue when empty argument passed may causing no argument passed error
* Removing Logger method invocation when instantiating the object
This commit is contained in:
Setiawan Hu 2020-12-10 21:00:06 +07:00
parent d5bbea7b0f
commit 7a7e2fb511

View File

@ -26,10 +26,8 @@ class TelegramObject implements Arrayable
*
* @param array|updates $fields request / response payloads
*/
public function __construct($fields)
public function __construct($fields = [])
{
Logger::log($fields);
$this->fields = $fields;
}