mirror of
https://github.com/danog/MadelineProto.git
synced 2025-01-23 10:51:25 +01:00
Fixes
This commit is contained in:
parent
8199cf695a
commit
aeed13260f
@ -109,7 +109,7 @@ class MTProto extends AsyncConstruct implements TLCallback
|
|||||||
*
|
*
|
||||||
* @var string
|
* @var string
|
||||||
*/
|
*/
|
||||||
const RELEASE = '5.0';
|
const RELEASE = '6.0';
|
||||||
/**
|
/**
|
||||||
* We're not logged in.
|
* We're not logged in.
|
||||||
*
|
*
|
||||||
|
@ -255,6 +255,9 @@ class Magic
|
|||||||
\set_error_handler([Exception::class, 'ExceptionErrorHandler']);
|
\set_error_handler([Exception::class, 'ExceptionErrorHandler']);
|
||||||
\set_exception_handler([Exception::class, 'ExceptionHandler']);
|
\set_exception_handler([Exception::class, 'ExceptionHandler']);
|
||||||
self::$isIpcWorker = \defined('MADELINE_WORKER_TYPE') ? \MADELINE_WORKER_TYPE === 'madeline-ipc' : false;
|
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') {
|
if (PHP_SAPI !== 'cli' && PHP_SAPI !== 'phpdbg') {
|
||||||
try {
|
try {
|
||||||
\error_reporting(E_ALL);
|
\error_reporting(E_ALL);
|
||||||
@ -274,9 +277,6 @@ class Magic
|
|||||||
self::$isatty = \defined('STDOUT') && hasColorSupport();
|
self::$isatty = \defined('STDOUT') && hasColorSupport();
|
||||||
} catch (\Throwable $e) {
|
} catch (\Throwable $e) {
|
||||||
}
|
}
|
||||||
// Important, obtain root relative to caller script
|
|
||||||
$backtrace = \debug_backtrace(0);
|
|
||||||
self::$script_cwd = self::$cwd = \dirname(\end($backtrace)['file']);
|
|
||||||
try {
|
try {
|
||||||
self::$cwd = \getcwd();
|
self::$cwd = \getcwd();
|
||||||
self::$can_getcwd = true;
|
self::$can_getcwd = true;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user