diff --git a/src/danog/MadelineProto/TL/TL.php b/src/danog/MadelineProto/TL/TL.php index 6759895e..fffcae75 100644 --- a/src/danog/MadelineProto/TL/TL.php +++ b/src/danog/MadelineProto/TL/TL.php @@ -319,7 +319,7 @@ trait TL return $concat; case 'Bool': - return $this->constructors->find_by_predicate($bool ? 'boolTrue' : 'boolFalse')['id']; + return $this->constructors->find_by_predicate(((bool)$object) ? 'boolTrue' : 'boolFalse')['id']; case 'true': return; case '!X':