Fix import.start for PHP 8.4 escapeshellarg types

This commit is contained in:
2026-02-11 02:21:58 +02:00
parent 070e46cf77
commit ed5e3f2bda

View File

@@ -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'];