1
0
Fork 0
mirror of https://codeberg.org/demostf/api.git synced 2026-06-04 02:14:06 +02:00

update parser

This commit is contained in:
Robin Appelman 2024-03-29 16:51:13 +01:00
commit 5e3e9d5ab7
3 changed files with 1633 additions and 4 deletions

View file

@ -16,7 +16,7 @@ $autoloader = require __DIR__ . '/../vendor/autoload.php';
function getEnvVar(string $name): string {
$var = getenv($name) ?: '';
if (str_contains($var, '$CREDENTIALS_DIRECTORY')) {
$credentialsDirectory = getenv('CREDENTIALS_DIRECTORY') ?? '';
$credentialsDirectory = getenv('CREDENTIALS_DIRECTORY') ?: '';
$path = str_replace('$CREDENTIALS_DIRECTORY', $credentialsDirectory, $var);
$var = file_get_contents($path);
}