diff --git a/src/Appwrite/Platform/Modules/Sites/Http/Frameworks/XList.php b/src/Appwrite/Platform/Modules/Sites/Http/Frameworks/XList.php index 1be5199494..e49ace4486 100644 --- a/src/Appwrite/Platform/Modules/Sites/Http/Frameworks/XList.php +++ b/src/Appwrite/Platform/Modules/Sites/Http/Frameworks/XList.php @@ -69,6 +69,12 @@ class XList extends Base // Drop frameworks that have no enabled build runtimes left. if (empty($frameworks[$key]['runtimes'])) { unset($frameworks[$key]); + continue; + } + + // Keep the default buildRuntime aligned with the filtered allowlist. + if (!\in_array($frameworks[$key]['buildRuntime'] ?? '', $frameworks[$key]['runtimes'], true)) { + $frameworks[$key]['buildRuntime'] = $frameworks[$key]['runtimes'][0]; } } }