From e803d2d0a7f16b6e7aedecec33fa534323e0ee31 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9drix?= Date: Fri, 15 May 2026 09:23:38 +0200 Subject: [PATCH] =?UTF-8?q?fix=20:=20DATA=5FPATH=20d=C3=A9fini=20dans=20co?= =?UTF-8?q?nfig/config.php=20(manquant=20=C3=A0=20l'ex=C3=A9cution)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit bootstrap.php ne suffisait pas — index.php, feed.php et sitemap.php passent par config/config.php. DATA_PATH est maintenant défini là, juste après le chargement du .env. file.php charge désormais config/config.php. Co-Authored-By: Claude Sonnet 4.6 --- config/config.php | 6 ++++++ public/file.php | 3 +++ 2 files changed, 9 insertions(+) diff --git a/config/config.php b/config/config.php index 0971b05..2c6b447 100644 --- a/config/config.php +++ b/config/config.php @@ -20,6 +20,12 @@ if (!$_ENV['APP_URL']) { // Normalise: toujours un trailing slash unique define('APP_URL', rtrim($_ENV['APP_URL'], '/') . '/'); +if (!defined('DATA_PATH')) { + $__dp = $_ENV['DATA_PATH'] ?? getenv('DATA_PATH') ?: ''; + define('DATA_PATH', $__dp !== '' ? rtrim($__dp, '/') : BASE_PATH . '/data'); + unset($__dp); +} + // (Optionnel) Expose dans $_ENV si besoin $_ENV['APP_URL'] = APP_URL; diff --git a/public/file.php b/public/file.php index b9b947a..7132653 100644 --- a/public/file.php +++ b/public/file.php @@ -4,6 +4,9 @@ declare(strict_types=1); define('BASE_PATH', realpath(__DIR__ . '/../')); +require_once BASE_PATH . '/vendor/autoload.php'; +require_once BASE_PATH . '/config/config.php'; + $uuid = $_GET['uuid'] ?? ''; $name = $_GET['name'] ?? '';