Small bugfix and improvement for layer diffing script
This commit is contained in:
parent
26d13c6e5c
commit
1efbe6a337
@ -76,7 +76,7 @@ foreach (['methods', 'constructors'] as $type) {
|
|||||||
foreach ($new[$type]->by_id as $constructor) {
|
foreach ($new[$type]->by_id as $constructor) {
|
||||||
$name = $constructor[$key];
|
$name = $constructor[$key];
|
||||||
$constructor['id'] = $new[$type]->$finder($name)['id'];
|
$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'];
|
$new_args = $constructor['params'];
|
||||||
$old_args = $old[$type]->$finder($name)['params'];
|
$old_args = $old[$type]->$finder($name)['params'];
|
||||||
$final_new_args = [];
|
$final_new_args = [];
|
||||||
|
@ -122,6 +122,9 @@ trait Tools
|
|||||||
|
|
||||||
public static function unpack_signed_long_string($value)
|
public static function unpack_signed_long_string($value)
|
||||||
{
|
{
|
||||||
|
if (is_int($value)) {
|
||||||
|
return (string) $value;
|
||||||
|
}
|
||||||
if (strlen($value) !== 8) {
|
if (strlen($value) !== 8) {
|
||||||
throw new TL\Exception(\danog\MadelineProto\Lang::$current_lang['length_not_8']);
|
throw new TL\Exception(\danog\MadelineProto\Lang::$current_lang['length_not_8']);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user