1
0
mirror of https://github.com/danog/MadelineProto.git synced 2025-01-22 23:11:19 +01:00

Fix serialization

This commit is contained in:
Alexander Pankratov 2021-02-04 01:28:41 +03:00
parent 02818b2c53
commit ad4b0264ce

View File

@ -408,6 +408,9 @@ class TL
*/
public function serializeObject(array $type, $object, $ctx, int $layer = -1): \Generator
{
if ($object instanceof \Generator) {
$object = yield from $object;
}
switch ($type['type']) {
case 'int':
if (!\is_numeric($object)) {