diff --git a/app/extensions/extension_edit.php b/app/extensions/extension_edit.php index 2b1fba6733..e69c847fc8 100644 --- a/app/extensions/extension_edit.php +++ b/app/extensions/extension_edit.php @@ -17,7 +17,7 @@ The Initial Developer of the Original Code is Mark J Crane - Portions created by the Initial Developer are Copyright (C) 2008-2022 + Portions created by the Initial Developer are Copyright (C) 2008-2023 the Initial Developer. All Rights Reserved. Contributor(s): @@ -1359,7 +1359,7 @@ $templates = scandir($template_dir.'/'.$row["name"]); foreach($templates as $dir) { if (!empty($dir) && $dir != "." && $dir != ".." && $dir[0] != '.' && !empty($template_dir) && is_dir($template_dir.'/'.$row["name"].'/'.$dir)) { - $selected = $device_template == $row["name"]."/".$dir ? "selected='selected'" : null; + $selected = !empty($device_template) && $device_template == $row["name"]."/".$dir ? "selected='selected'" : null; echo " \n"; } }