@@ -22,9 +22,9 @@ discard block |
||
| 22 | 22 | if (strlen($this->token)==45 && count(explode(':',$this->token))==2){ |
| 23 | 23 | $this->ch = curl_init(); |
| 24 | 24 | return true; |
| 25 | + } else { |
|
| 26 | + return false; |
|
| 25 | 27 | } |
| 26 | - else |
|
| 27 | - return false; |
|
| 28 | 28 | } |
| 29 | 29 | |
| 30 | 30 | /** |
@@ -49,7 +49,7 @@ discard block |
||
| 49 | 49 | $res = curl_exec($this->ch); |
| 50 | 50 | if(curl_error($this->ch)){ |
| 51 | 51 | var_dump(curl_error($this->ch)); |
| 52 | - }else{ |
|
| 52 | + } else{ |
|
| 53 | 53 | $res=json_decode($res); |
| 54 | 54 | if ($res->ok){ |
| 55 | 55 | $res=$res->result; |
@@ -366,8 +366,9 @@ discard block |
||
| 366 | 366 | */ |
| 367 | 367 | public function getFileLink($file_path) |
| 368 | 368 | { |
| 369 | - if (is_object($file_path)) |
|
| 370 | - $file_path=$file_path->file_path; |
|
| 369 | + if (is_object($file_path)) { |
|
| 370 | + $file_path=$file_path->file_path; |
|
| 371 | + } |
|
| 371 | 372 | return 'https://api.telegram.org/file/bot'.$this->token.'/'.$file_path; |
| 372 | 373 | } |
| 373 | 374 | |