Helpful errors

This commit is contained in:
Daniil Gentili 2017-07-26 19:27:13 +02:00
parent 7d7bcdbed5
commit 9d97ebb843

View File

@ -44,7 +44,7 @@ class MTProto extends \Volatile
use \danog\MadelineProto\Wrappers\DialogHandler;
use \danog\MadelineProto\Wrappers\Login;
const V = 63;
const V = 64;
const NOT_LOGGED_IN = 0;
const WAITING_CODE = 1;
@ -191,6 +191,9 @@ class MTProto extends \Volatile
public function ___construct($settings = [])
{
if (!defined('\phpseclib\Crypt\AES::MODE_IGE')) {
throw new Exception('Please install this fork of phpseclib: https://github.com/danog/phpseclib');
}
$this->emojis = json_decode(self::JSON_EMOJIS);
\danog\MadelineProto\Logger::class_exists();
@ -270,6 +273,9 @@ class MTProto extends \Volatile
if (\danog\MadelineProto\Logger::$has_thread && is_object(\Thread::getCurrentThread())) {
return;
}
if (!defined('\phpseclib\Crypt\AES::MODE_IGE')) {
throw new Exception('Please install this fork of phpseclib: https://github.com/danog/phpseclib');
}
foreach ($this->calls as $id => $controller) {
if (!is_object($controller)) {
unset($this->calls[$id]);