Perl strikes again - while an empty string evaluates falsy in Perl, it
is still defined and thus the //-operator cannot be used here.

Fixes: 93892c0 ("proxinstall: avoid open-coding FQDN sanity check")
Reported-by: Maximiliano Sandoval <m.sando...@proxmox.com>
Signed-off-by: Christoph Heiss <c.he...@proxmox.com>
---
 proxinstall | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/proxinstall b/proxinstall
index 351b240..d28aeaa 100755
--- a/proxinstall
+++ b/proxinstall
@@ -461,7 +461,8 @@ sub create_ipconf_view {
        my $err = $@;
 
        if ($err || $text =~ m/.example.invalid$/) {
-           Proxmox::UI::message($err // 'Hostname does not look like a valid 
fully qualified domain name');
+           $err = 'Hostname does not look like a valid fully qualified domain 
name' if !$err;
+           Proxmox::UI::message($err);
            $hostentry->grab_focus();
            return;
        } else {
-- 
2.43.0



_______________________________________________
pve-devel mailing list
pve-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel

Reply via email to