mirror of
https://github.com/danog/MadelineProto.git
synced 2025-01-23 02:11:14 +01:00
Fix serialization
This commit is contained in:
parent
02818b2c53
commit
ad4b0264ce
@ -408,6 +408,9 @@ class TL
|
|||||||
*/
|
*/
|
||||||
public function serializeObject(array $type, $object, $ctx, int $layer = -1): \Generator
|
public function serializeObject(array $type, $object, $ctx, int $layer = -1): \Generator
|
||||||
{
|
{
|
||||||
|
if ($object instanceof \Generator) {
|
||||||
|
$object = yield from $object;
|
||||||
|
}
|
||||||
switch ($type['type']) {
|
switch ($type['type']) {
|
||||||
case 'int':
|
case 'int':
|
||||||
if (!\is_numeric($object)) {
|
if (!\is_numeric($object)) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user