1
0
mirror of https://github.com/danog/MadelineProto.git synced 2024-11-26 21:34:41 +01:00

Fixup phar

This commit is contained in:
Daniil Gentili 2023-07-17 07:52:13 +02:00
parent d4391f2b52
commit 71ba3bc564
2 changed files with 3 additions and 3 deletions

View File

@ -52,7 +52,7 @@ final class API extends AbstractAPI
*
* @var string
*/
public const RELEASE = '8.0.0-beta105';
public const RELEASE = '8.0.0-beta106';
/**
* Secret chat was not found.
*

View File

@ -46,7 +46,7 @@ if (defined("MADELINE_REAL_ROOT")) {
@chdir(MADELINE_REAL_ROOT);
} else {
$backtrace = \debug_backtrace(0);
if (\count($backtrace) === 1) {
if (\count($backtrace) === 0) {
if (isset($GLOBALS["argv"]) && !empty($GLOBALS["argv"])) {
$arguments = \array_slice($GLOBALS["argv"], 1);
} elseif (isset($_GET["argv"]) && !empty($_GET["argv"])) {
@ -60,7 +60,7 @@ if (defined("MADELINE_REAL_ROOT")) {
} else {
die("MadelineProto loader: you must include this file in another PHP script, see https://docs.madelineproto.xyz for more info.".PHP_EOL);
}
\define("MADELINE_REAL_ROOT", \dirname($backtrace[0]["file"]));
\define("MADELINE_REAL_ROOT", \dirname(Phar::running(false)));
@chdir(\MADELINE_REAL_ROOT);
}
}