mirror of
https://github.com/openvk/openvk
synced 2025-03-04 00:29:57 +03:00
fix(cli): Fix errors in fetch-ton cli command
This commit is contained in:
parent
ee0dd8c749
commit
6bb2c2fd1d
2 changed files with 4 additions and 3 deletions
|
@ -17,7 +17,7 @@ define("NANOTON", 1000000000);
|
||||||
|
|
||||||
class FetchToncoinTransactions extends Command
|
class FetchToncoinTransactions extends Command
|
||||||
{
|
{
|
||||||
private $images;
|
private $transactions;
|
||||||
|
|
||||||
protected static $defaultName = "fetch-ton";
|
protected static $defaultName = "fetch-ton";
|
||||||
|
|
||||||
|
@ -76,7 +76,6 @@ class FetchToncoinTransactions extends Command
|
||||||
|
|
||||||
$header->writeln("Gonna up the balance of users");
|
$header->writeln("Gonna up the balance of users");
|
||||||
foreach ($response["result"] as $transfer) {
|
foreach ($response["result"] as $transfer) {
|
||||||
$outputArray;
|
|
||||||
preg_match('/' . OPENVK_ROOT_CONF["openvk"]["preferences"]["ton"]["regex"] . '/', $transfer["in_msg"]["message"], $outputArray);
|
preg_match('/' . OPENVK_ROOT_CONF["openvk"]["preferences"]["ton"]["regex"] . '/', $transfer["in_msg"]["message"], $outputArray);
|
||||||
$userId = ctype_digit($outputArray[1]) ? intval($outputArray[1]) : null;
|
$userId = ctype_digit($outputArray[1]) ? intval($outputArray[1]) : null;
|
||||||
if (is_null($userId)) {
|
if (is_null($userId)) {
|
||||||
|
|
|
@ -443,7 +443,9 @@ function downloadable_name(string $text): string
|
||||||
}
|
}
|
||||||
|
|
||||||
return (function () {
|
return (function () {
|
||||||
_ovk_check_environment();
|
if (php_sapi_name() != "cli")
|
||||||
|
_ovk_check_environment();
|
||||||
|
|
||||||
require __DIR__ . "/vendor/autoload.php";
|
require __DIR__ . "/vendor/autoload.php";
|
||||||
|
|
||||||
setlocale(LC_TIME, "POSIX");
|
setlocale(LC_TIME, "POSIX");
|
||||||
|
|
Loading…
Reference in a new issue