chiark / gitweb /
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 ffdfb8ee698e5d6d0fb87f7084a8bc83785b4a34..2da54f626d26d401429bdc6cb8d9143546fc94ff 100755 (executable)
@@ -260,7 +260,7 @@ sub watch_and_notify0 ($) {
       }
 
       @lines = split /\n/, $buffer, -1;
-      $buffer = pop @lines;
+      $buffer = pop(@lines) // "";
     }
   }
 
index d9429bbb658d1359e7cd040b57151ad5186fb6d1..a517e7b9d08fb5dcf20f9b0a4d35aaaf263f9344 100755 (executable)
@@ -130,7 +130,7 @@ sub watch_status () {
       }
 
       @lines = split /\n/, $buffer, -1;
-      $buffer = pop @lines;
+      $buffer = pop(@lines) // "";
     }
 
     for my $line (@lines) {