From fe2384a2fa17bb75d4b5f8a69a562751f177edca Mon Sep 17 00:00:00 2001 From: "CanbiZ (MickLesk)" <47820557+MickLesk@users.noreply.github.com> Date: Wed, 21 Jan 2026 12:42:19 +0100 Subject: [PATCH] Initialize variables in create_lxc_container Added initialization for ONLINE_TEMPLATE and ONLINE_TEMPLATES arrays at the start of the create_lxc_container function to ensure variables are defined before use. --- misc/build.func | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/misc/build.func b/misc/build.func index 4d45676eb..1e6b3a3d4 100644 --- a/misc/build.func +++ b/misc/build.func @@ -4478,6 +4478,10 @@ create_lxc_container() { msg_info "Searching for template '$TEMPLATE_SEARCH'" + # Initialize variables + ONLINE_TEMPLATE="" + ONLINE_TEMPLATES=() + # Step 1: Check local templates first (instant) mapfile -t LOCAL_TEMPLATES < <( pveam list "$TEMPLATE_STORAGE" 2>/dev/null |