1
0
mirror of https://github.com/danog/MadelineProto.git synced 2024-11-30 10:38:59 +01:00

Another small improvement

This commit is contained in:
Daniil Gentili 2023-09-19 16:42:02 +02:00
parent 4439bfb14a
commit 07f41062b5
Signed by: danog
GPG Key ID: 8C1BE3B34B230CA7

View File

@ -649,14 +649,14 @@ final class TL implements TLInterface
'pow' => $pow
]) {
$arguments[$flag] ??= 0;
switch ($type) {
case 'true':
$arguments[$flag] = isset($arguments[$name]) && $arguments[$name] ? $arguments[$flag] | $pow : $arguments[$flag] & ~$pow;
unset($arguments[$name]);
break;
default:
$arguments[$flag] = isset($arguments[$name]) && $arguments[$name] !== null ? $arguments[$flag] | $pow : $arguments[$flag] & ~$pow;
break;
if ($type === 'true') {
$arguments[$flag] = isset($arguments[$name]) && $arguments[$name]
? $arguments[$flag] | $pow
: $arguments[$flag] & ~$pow;
} else {
$arguments[$flag] = isset($arguments[$name]) && $arguments[$name] !== null
? $arguments[$flag] | $pow
: $arguments[$flag] & ~$pow;
}
}
foreach ($tl['params'] as $current_argument) {