Avoid problems with corrupted settings

This commit is contained in:
Daniil Gentili 2018-03-09 17:42:55 +00:00
parent 9436468bd0
commit e8f2ae85c8

View File

@ -496,7 +496,7 @@ class MTProto
// Need info ?
'requests' => true,
]];
if ($settings === false) {
if (!is_array($settings)) {
$settings = [];
}
$settings = array_replace_recursive($this->array_cast_recursive($default_settings, true), $this->array_cast_recursive($settings, true));
@ -667,7 +667,6 @@ class MTProto
} catch (RPCErrorException $e) {
return false;
}
return $this->authorization['user'];
}