1
0
mirror of https://github.com/danog/MadelineProto.git synced 2025-01-23 06:31:11 +01:00
This commit is contained in:
Daniil Gentili 2021-09-25 14:27:58 +02:00
parent 8199cf695a
commit aeed13260f
Signed by: danog
GPG Key ID: 8C1BE3B34B230CA7
2 changed files with 4 additions and 4 deletions

View File

@ -109,7 +109,7 @@ class MTProto extends AsyncConstruct implements TLCallback
*
* @var string
*/
const RELEASE = '5.0';
const RELEASE = '6.0';
/**
* We're not logged in.
*

View File

@ -255,6 +255,9 @@ class Magic
\set_error_handler([Exception::class, 'ExceptionErrorHandler']);
\set_exception_handler([Exception::class, 'ExceptionHandler']);
self::$isIpcWorker = \defined('MADELINE_WORKER_TYPE') ? \MADELINE_WORKER_TYPE === 'madeline-ipc' : false;
// Important, obtain root relative to caller script
$backtrace = \debug_backtrace(0);
self::$script_cwd = self::$cwd = \dirname(\end($backtrace)['file']);
if (PHP_SAPI !== 'cli' && PHP_SAPI !== 'phpdbg') {
try {
\error_reporting(E_ALL);
@ -274,9 +277,6 @@ class Magic
self::$isatty = \defined('STDOUT') && hasColorSupport();
} catch (\Throwable $e) {
}
// Important, obtain root relative to caller script
$backtrace = \debug_backtrace(0);
self::$script_cwd = self::$cwd = \dirname(\end($backtrace)['file']);
try {
self::$cwd = \getcwd();
self::$can_getcwd = true;