[pmg-devel] [PATCH pmg-api 1/3] proxy: initialize the theme variable with an empty string

Stefan Sterz s.sterz at proxmox.com
Thu Mar 23 16:44:53 CET 2023


this removes a warning that was previously present due to using an
uninitialized variable.

Signed-off-by: Stefan Sterz <s.sterz at proxmox.com>
---
 src/PMG/Service/pmgproxy.pm | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/PMG/Service/pmgproxy.pm b/src/PMG/Service/pmgproxy.pm
index 310519a..5bd9de2 100755
--- a/src/PMG/Service/pmgproxy.pm
+++ b/src/PMG/Service/pmgproxy.pm
@@ -199,7 +199,7 @@ sub get_index {
 	$mobile = $args->{mobile} ? 1 : 0;
     }
 
-    my $theme;
+    my $theme = "";
 
     if (my $cookie = $r->header('Cookie')) {
 	if (my $newlang = ($cookie =~ /(?:^|\s)PMGLangCookie=([^;]*)/)[0]) {
-- 
2.30.2





More information about the pmg-devel mailing list