disorder-notify.in, disorder-ondemand.in: Make sure `$buffer' is defined.
authorMark Wooding <mdw@distorted.org.uk>
Fri, 2 Jul 2021 17:00:36 +0000 (18:00 +0100)
committerMark Wooding <mdw@distorted.org.uk>
Fri, 2 Jul 2021 17:02:04 +0000 (18:02 +0100)
disorder-notify.in
disorder-ondemand.in

index ffdfb8e..2da54f6 100755 (executable)
@@ -260,7 +260,7 @@ sub watch_and_notify0 ($) {
       }
 
       @lines = split /\n/, $buffer, -1;
-      $buffer = pop @lines;
+      $buffer = pop(@lines) // "";
     }
   }
 
index d9429bb..a517e7b 100755 (executable)
@@ -130,7 +130,7 @@ sub watch_status () {
       }
 
       @lines = split /\n/, $buffer, -1;
-      $buffer = pop @lines;
+      $buffer = pop(@lines) // "";
     }
 
     for my $line (@lines) {