Let's not break stuff
This commit is contained in:
parent
6e3e9e5d12
commit
b25d926acd
@ -179,7 +179,7 @@ class Connection
|
||||
throw new Exception("Connection: couldn't connect to socket.");
|
||||
}
|
||||
$packet = stream_get_contents($this->sock, $length);
|
||||
if ($packet === false || strlen($packet) != $length) {
|
||||
if (strlen($packet) != $length) {
|
||||
throw new \danog\MadelineProto\Exception("WARNING: Wrong length was read (should've read ".($length).', read '.strlen($packet).')!');
|
||||
}
|
||||
|
||||
|
@ -225,10 +225,7 @@ Slv8kg9qv1m6XHVQY3PnEw+QQtqSIXklHwIDAQAB
|
||||
|
||||
public function setup_logger()
|
||||
{
|
||||
//if (!\danog\MadelineProto\Logger::$constructed) {
|
||||
// Set up logger class
|
||||
\danog\MadelineProto\Logger::constructor($this->settings['logger']['logger'], $this->settings['logger']['logger_param'], isset($this->datacenter->authorization['user']) ? (isset($this->datacenter->authorization['user']['username']) ? $this->datacenter->authorization['user']['username'] : $this->datacenter->authorization['user']['id']) : '', $this->settings['logger']['logger_level']);
|
||||
//}
|
||||
\danog\MadelineProto\Logger::constructor($this->settings['logger']['logger'], $this->settings['logger']['logger_param'], isset($this->datacenter->authorization['user']) ? (isset($this->datacenter->authorization['user']['username']) ? $this->datacenter->authorization['user']['username'] : $this->datacenter->authorization['user']['id']) : '', isset($this->settings['logger']['logger_level']) ? $this->settings['logger']['logger_level'] : Logger::VERBOSE);
|
||||
}
|
||||
|
||||
public function reset_session($de = true)
|
||||
|
@ -17,7 +17,7 @@ if (file_exists('web_data.php')) {
|
||||
}
|
||||
|
||||
echo 'Deserializing MadelineProto from session.madeline...'.PHP_EOL;
|
||||
$MadelineProto = \danog\MadelineProto\Serialization::deserialize('session.madeline');
|
||||
$MadelineProto = \danog\MadelineProto\Serialization::deserialize('/tmp/pwr.madeline');
|
||||
|
||||
if (file_exists('.env')) {
|
||||
echo 'Loading .env...'.PHP_EOL;
|
||||
|
Loading…
Reference in New Issue
Block a user