Make environment loading compatible with Plesk
This commit is contained in:
+10
-5
@@ -1,8 +1,13 @@
|
||||
|
||||
<?php
|
||||
$legalFormsCsv = app_cached_string(
|
||||
'legal-forms',
|
||||
app_env_int('REFERENCE_CACHE_SECONDS', 86400, 300, 604800),
|
||||
static fn(): string => legalFormCSV((string)$username, (string)$password)
|
||||
);
|
||||
$legalFormsCsv = '';
|
||||
try {
|
||||
$legalFormsCsv = app_cached_string(
|
||||
'legal-forms',
|
||||
app_env_int('REFERENCE_CACHE_SECONDS', 86400, 300, 604800),
|
||||
static fn(): string => legalFormCSV((string)$username, (string)$password)
|
||||
);
|
||||
} catch (Throwable $exception) {
|
||||
error_log('Legal-form reference data could not be loaded: ' . $exception->getMessage());
|
||||
}
|
||||
echo 'legalFormsCsvData = ' . json_encode($legalFormsCsv, JSON_HEX_TAG | JSON_HEX_AMP | JSON_HEX_APOS | JSON_HEX_QUOT) . ';';
|
||||
|
||||
Reference in New Issue
Block a user