1
0
mirror of https://github.com/danog/MadelineProto.git synced 2025-01-22 22:51:11 +01:00

Die immediately if running on PHP 8.2.2

This commit is contained in:
Daniil Gentili 2023-02-06 14:48:08 +01:00
parent a5d9131611
commit f139decef3
3 changed files with 19 additions and 0 deletions

View File

@ -892,6 +892,13 @@ abstract class InternalDoc
{
return $this->wrapper->getAPI()->getSelf();
}
/**
* Returns the session name.
*/
public function getSessionName(): string
{
return $this->wrapper->getAPI()->getSessionName();
}
/**
* Return current settings.
*/

View File

@ -667,6 +667,13 @@ final class MTProto implements TLCallback, LoggerGetter
{
return $this->wrapper;
}
/**
* Returns the session name.
*/
public function getSessionName(): string
{
return $this->wrapper->getSession()->getSessionDirectoryPath();
}
/**
* Sleep function.
*

View File

@ -8,6 +8,11 @@ if (defined('MADELINE_POLYFILLED')) {
define('MADELINE_POLYFILLED', true);
if (PHP_VERSION_ID === 80202) {
echo('PHP 8.2.2 has a critical garbage collector bug, please switch to PHP 8.1, PHP 8.2.1 or PHP 8.2.3 once it gets released');
die(1);
}
use Amp\Http\Client\Cookie\InMemoryCookieJar;
use Amp\Http\Client\Cookie\LocalCookieJar;
use Amp\Socket\EncryptableSocket;