1
0
mirror of https://github.com/danog/MadelineProto.git synced 2024-11-30 07:18:57 +01:00

Small fix for IPC exceptions

This commit is contained in:
Daniil Gentili 2023-12-24 19:28:21 +01:00
parent 6b5ba25354
commit 53f1fac201
2 changed files with 8 additions and 4 deletions

View File

@ -51,7 +51,7 @@ final class API extends AbstractAPI
*
* @var string
*/
public const RELEASE = '8.0.0-beta186';
public const RELEASE = '8.0.0-beta187';
/**
* We're not logged in.
*

View File

@ -69,7 +69,12 @@ final class ExitFailure
foreach ($props as $class => $subprops) {
$class = new ReflectionClass($class);
foreach ($subprops as $key => $value) {
foreach ($class->getProperties() as $prop) {
$key = $prop->getName();
if (!\array_key_exists($key, $subprops)) {
continue;
}
$value = $subprops[$key];
if ($key === 'previous') {
if ($value instanceof self) {
$value = $value->getException();
@ -80,8 +85,7 @@ final class ExitFailure
$value = "$value\n\nClient TL trace:".$prev->getTLTrace();
}
try {
$key = $refl->getProperty($key);
$key->setValue($exception, $value);
$prop->setValue($exception, $value);
} catch (\Throwable) {
}
}