Dev #48

Merged
NiekRabelink merged 6 commits from dev into main 2026-09-11 13:12:36 +00:00
2 changed files with 28 additions and 19 deletions
+7 -1
View File
@@ -1,6 +1,12 @@
# Environment
# Environment & Secrets
.env
.env.*
.env*.local
*.env
config/.env
config/.env.*
!.env.example
!config/.env.example
# Systeem & Editor
.DS_Store
+5 -2
View File
@@ -25,9 +25,10 @@ if (!headers_sent()) {
}
@ini_set('expose_php', 'off');
// 1. Optionele .env inlezing uit de hoofdmap (uitsluitend .env, GEEN .env.example fallback)
// 1. .env inlezing (controleert zowel config/.env als hoofdmap .env)
$envVars = [];
$envFile = __DIR__ . '/../.env';
$envLocations = [__DIR__ . '/.env', __DIR__ . '/../.env'];
foreach ($envLocations as $envFile) {
if (file_exists($envFile)) {
$lines = file($envFile, FILE_IGNORE_NEW_LINES | FILE_SKIP_EMPTY_LINES);
if ($lines !== false) {
@@ -47,6 +48,8 @@ if (file_exists($envFile)) {
}
}
}
break; // Eerste gevonden .env bestand is leidend
}
}
/**