diff --git a/bin/jabali-agent b/bin/jabali-agent index c0663d8..fa56f14 100755 --- a/bin/jabali-agent +++ b/bin/jabali-agent @@ -13021,7 +13021,7 @@ function discoverDirectAdminRemote(string $host, int $port, string $user, string */ function importStart(array $params): array { - $importId = $params['import_id'] ?? 0; + $importId = (int) ($params['import_id'] ?? 0); logger("Starting import process for import ID: $importId"); @@ -13035,7 +13035,7 @@ function importStart(array $params): array } // Dispatch a Laravel job to handle the import in the background - $cmd = "cd /var/www/jabali && php artisan import:process " . escapeshellarg($importId) . " > /dev/null 2>&1 &"; + $cmd = "cd /var/www/jabali && php artisan import:process " . escapeshellarg((string) $importId) . " > /dev/null 2>&1 &"; exec($cmd); return ['success' => true, 'message' => 'Import process started'];