Make environment loading compatible with Plesk

This commit is contained in:
2026-07-22 10:11:15 +02:00
parent 9518bb8c6a
commit cadb633d51
6 changed files with 62 additions and 19 deletions
+10 -5
View File
@@ -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) . ';';