Correctly check for empty value, instead of using empty().

Fixes #670
parent caca27f8
......@@ -13,6 +13,7 @@ Exclamation symbols (:exclamation:) note something of importance e.g. breaking c
### Fixed
- SQL update script for version 0.44.1-0.45.0.
- Issues found by Scrutinizer (Type hints and return values).
- Check inline keyboard button parameter value correctly.
### Security
## [0.49.0] - 2017-09-17
......
......@@ -64,7 +64,7 @@ class InlineKeyboardButton extends KeyboardButton
$num_params = 0;
foreach (['url', 'callback_data', 'switch_inline_query', 'switch_inline_query_current_chat', 'pay'] as $param) {
if (!empty($this->getProperty($param))) {
if ($this->getProperty($param, '') !== '') {
$num_params++;
}
}
......
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