Skip to content

Commit 58c1cbb

Browse files
Add SMART_EXTRACT env vars to variablesParameter
Include SMART_EXTRACT_API_HOST and SMART_EXTRACT_REQUEST_TIMEOUT inside both the escaped and non-escaped branches when building variablesParameter so they are properly escaped when $useEscape is true. Remove the duplicated lines that were appended outside the conditional. This ensures SMART_EXTRACT settings are consistently included alongside HOST_URL.
1 parent 0754dd3 commit 58c1cbb

1 file changed

Lines changed: 4 additions & 3 deletions

File tree

ProcessMaker/ScriptRunners/Base.php

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -188,13 +188,14 @@ private function getEnvironmentVariables($useEscape = true)
188188
// Add the url to the host
189189
if ($useEscape) {
190190
$variablesParameter[] = 'HOST_URL=' . escapeshellarg(config('app.docker_host_url'));
191+
$variablesParameter[] = 'SMART_EXTRACT_API_HOST=' . escapeshellarg(config('smart-extract.api_host'));
192+
$variablesParameter[] = 'SMART_EXTRACT_REQUEST_TIMEOUT=' . escapeshellarg((string) config('smart-extract.request_timeout'));
191193
} else {
192194
$variablesParameter[] = 'HOST_URL=' . config('app.docker_host_url');
195+
$variablesParameter[] = 'SMART_EXTRACT_API_HOST=' . config('smart-extract.api_host');
196+
$variablesParameter[] = 'SMART_EXTRACT_REQUEST_TIMEOUT=' . config('smart-extract.request_timeout');
193197
}
194198

195-
$variablesParameter[] = 'SMART_EXTRACT_API_HOST=' . config('smart-extract.api_host');
196-
$variablesParameter[] = 'SMART_EXTRACT_REQUEST_TIMEOUT=' . config('smart-extract.request_timeout');
197-
198199
return $variablesParameter;
199200
}
200201

0 commit comments

Comments
 (0)