Skip to content

Commit 9311120

Browse files
committed
Merge 0.54.1 hotfix into add_missing_db_fields
2 parents b2ee9cd + 70198f8 commit 9311120

File tree

5 files changed

+38
-30
lines changed

5 files changed

+38
-30
lines changed

CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,10 @@ Exclamation symbols (:exclamation:) note something of importance e.g. breaking c
1616
### Fixed
1717
### Security
1818

19+
## [0.54.1] - 2018-10-23
20+
### Fixed
21+
- `sendToActiveChats` now works correctly for any valid Request action.
22+
1923
## [0.54.0] - 2018-07-21
2024
:exclamation: After updating to this version, you will need to execute the [SQL migration script][0.54.0-sql-migration] on your database.
2125
### Added
@@ -237,6 +241,7 @@ Exclamation symbols (:exclamation:) note something of importance e.g. breaking c
237241
[example-bot]: https://github.com/php-telegram-bot/example-bot
238242

239243
[Unreleased]: https://github.com/php-telegram-bot/core/compare/master...develop
244+
[0.54.1]: https://github.com/php-telegram-bot/core/compare/0.54.0...0.54.1
240245
[0.54.0]: https://github.com/php-telegram-bot/core/compare/0.53.0...0.54.0
241246
[0.53.0]: https://github.com/php-telegram-bot/core/compare/0.52.0...0.53.0
242247
[0.52.0]: https://github.com/php-telegram-bot/core/compare/0.51.0...0.52.0

composer.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,12 +26,13 @@
2626
"php": "^5.5|^7.0",
2727
"ext-pdo": "*",
2828
"ext-curl": "*",
29+
"ext-json": "*",
2930
"ext-mbstring": "*",
3031
"monolog/monolog": "^1.23",
3132
"guzzlehttp/guzzle": "^6.3"
3233
},
3334
"require-dev": {
34-
"phpunit/phpunit": "^4.8|^5.7|^6.5|^7.2",
35+
"phpunit/phpunit": "^4.8|^5.7|^6.5|^7.4",
3536
"squizlabs/php_codesniffer": "^3.3"
3637
},
3738
"autoload": {

composer.lock

Lines changed: 28 additions & 24 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/Request.php

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -605,17 +605,15 @@ public static function sendToActiveChats(
605605
array $data,
606606
array $select_chats_params
607607
) {
608-
if (!method_exists(Request::class, $callback_function)) {
609-
throw new TelegramException('Method "' . $callback_function . '" not found in class Request.');
610-
}
608+
self::ensureValidAction($callback_function);
611609

612610
$chats = DB::selectChats($select_chats_params);
613611

614612
$results = [];
615613
if (is_array($chats)) {
616614
foreach ($chats as $row) {
617615
$data['chat_id'] = $row['chat_id'];
618-
$results[] = call_user_func(Request::class . '::' . $callback_function, $data);
616+
$results[] = self::send($callback_function, $data);
619617
}
620618
}
621619

src/Telegram.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ class Telegram
3030
*
3131
* @var string
3232
*/
33-
protected $version = '0.54.0';
33+
protected $version = '0.54.1';
3434

3535
/**
3636
* Telegram API key

0 commit comments

Comments
 (0)