From 6bb2c2fd1d2e018ef30e17ee59b2f8f147ffc319 Mon Sep 17 00:00:00 2001 From: celestora Date: Sat, 22 Feb 2025 17:52:29 +0200 Subject: [PATCH] fix(cli): Fix errors in fetch-ton cli command --- CLI/FetchToncoinTransactions.php | 3 +-- bootstrap.php | 4 +++- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/CLI/FetchToncoinTransactions.php b/CLI/FetchToncoinTransactions.php index 9de2c998..8bffe030 100755 --- a/CLI/FetchToncoinTransactions.php +++ b/CLI/FetchToncoinTransactions.php @@ -17,7 +17,7 @@ define("NANOTON", 1000000000); class FetchToncoinTransactions extends Command { - private $images; + private $transactions; protected static $defaultName = "fetch-ton"; @@ -76,7 +76,6 @@ class FetchToncoinTransactions extends Command $header->writeln("Gonna up the balance of users"); foreach ($response["result"] as $transfer) { - $outputArray; preg_match('/' . OPENVK_ROOT_CONF["openvk"]["preferences"]["ton"]["regex"] . '/', $transfer["in_msg"]["message"], $outputArray); $userId = ctype_digit($outputArray[1]) ? intval($outputArray[1]) : null; if (is_null($userId)) { diff --git a/bootstrap.php b/bootstrap.php index 42241ca4..9100d3f2 100644 --- a/bootstrap.php +++ b/bootstrap.php @@ -443,7 +443,9 @@ function downloadable_name(string $text): string } return (function () { - _ovk_check_environment(); + if (php_sapi_name() != "cli") + _ovk_check_environment(); + require __DIR__ . "/vendor/autoload.php"; setlocale(LC_TIME, "POSIX");