Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Token contstructor required #1

Closed
orloffv opened this issue Jul 2, 2015 · 2 comments
Closed

Token contstructor required #1

orloffv opened this issue Jul 2, 2015 · 2 comments

Comments

@orloffv
Copy link

orloffv commented Jul 2, 2015

public function __construct($token, $async = false, $http_client_handler = null)
$this->accessToken = isset($token) ? $token : getenv(static::BOT_TOKEN_ENV_NAME);

maybe use
public function __construct($token = null, $async = false, $http_client_handler = null)?

@irazasyed
Copy link
Owner

Thanks for pointing out. Seems like i missed that. Pushing changes now 👍

@irazasyed
Copy link
Owner

Pushed a patch release - v0.2.1 and credited!

irpcpro added a commit to irpcpro/telegram-bot-sdk that referenced this issue Apr 3, 2023
in construct when properties could be null, type of these setter methods value should be also include type of null.
in other case these errors will throw :
Argument irazasyed#1 ($accessToken) must be of type string, null given
Argument irazasyed#1 ($endpoint) must be of type string, null given
Argument irazasyed#1 ($method) must be of type string, null given
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants