From dd80d26ff0753d3d43ce137dcd041708422be89f Mon Sep 17 00:00:00 2001 From: Andras Bacsai <5845193+andrasbacsai@users.noreply.github.com> Date: Thu, 25 Sep 2025 10:32:27 +0200 Subject: [PATCH] fix(environment-variable-warning): enhance warning logic to check for problematic variable values --- .../environment-variable-warning.blade.php | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/resources/views/components/environment-variable-warning.blade.php b/resources/views/components/environment-variable-warning.blade.php index ab7cab555..bb144172f 100644 --- a/resources/views/components/environment-variable-warning.blade.php +++ b/resources/views/components/environment-variable-warning.blade.php @@ -4,13 +4,18 @@ problematicVars: @js($problematicVariables), get showWarning() { const currentKey = $wire.key; + const currentValue = $wire.value; const isBuildtime = $wire.is_buildtime; if (!isBuildtime || !currentKey) return false; if (!this.problematicVars.hasOwnProperty(currentKey)) return false; - // Always show warning for known problematic variables when set as buildtime - return true; + const config = this.problematicVars[currentKey]; + if (!config || !config.problematic_values) return false; + + // Check if current value matches any problematic values + const lowerValue = String(currentValue).toLowerCase(); + return config.problematic_values.some(pv => pv.toLowerCase() === lowerValue); }, get warningMessage() { if (!this.showWarning) return null; @@ -25,8 +30,8 @@ return `Recommendation: ${config.recommendation}`; } }" x-if="showWarning"> -