diff --git a/layerdiff.php b/layerdiff.php index 32640022e..e057c5425 100644 --- a/layerdiff.php +++ b/layerdiff.php @@ -76,7 +76,7 @@ foreach (['methods', 'constructors'] as $type) { foreach ($new[$type]->by_id as $constructor) { $name = $constructor[$key]; $constructor['id'] = $new[$type]->$finder($name)['id']; - if ($old[$type]->$finder($name) && $old[$type]->$finder($name)['id'] !== $constructor['id']) { + if ($old[$type]->$finder($name)) { $new_args = $constructor['params']; $old_args = $old[$type]->$finder($name)['params']; $final_new_args = []; diff --git a/src/danog/MadelineProto/Tools.php b/src/danog/MadelineProto/Tools.php index ce609db31..c177ce0da 100644 --- a/src/danog/MadelineProto/Tools.php +++ b/src/danog/MadelineProto/Tools.php @@ -122,6 +122,9 @@ trait Tools public static function unpack_signed_long_string($value) { + if (is_int($value)) { + return (string) $value; + } if (strlen($value) !== 8) { throw new TL\Exception(\danog\MadelineProto\Lang::$current_lang['length_not_8']); }