Fix double submission bug, use createUnsafeMutable to override empty env values in Docker, and suppress direct warning printing

This commit is contained in:
ilham_gmail
2026-06-11 21:50:36 +07:00
parent cb3e18fc64
commit 4ad0081a02
3 changed files with 44 additions and 10 deletions
+1 -1
View File
@@ -9,7 +9,7 @@ require_once __DIR__ . '/../../../vendor/autoload.php';
$dotenvPath = __DIR__ . '/../../../';
if(file_exists($dotenvPath . '.env')){
try{
$dotenv = Dotenv\Dotenv::createImmutable($dotenvPath);
$dotenv = Dotenv\Dotenv::createUnsafeMutable($dotenvPath);
$dotenv->safeLoad();
}catch(Exception $e){}
}
+2
View File
@@ -1,4 +1,6 @@
<?php
ini_set('display_errors', '0');
error_reporting(E_ALL & ~E_NOTICE & ~E_WARNING);
include_once __DIR__ . '/config.php';
$dbHost = getenv('DB_HOST') ?: 'localhost';