diff --git a/lib/modules/Thread.pmod b/lib/modules/Thread.pmod
index 6e84496fc56dfe8f4b7364822551615407c75c46..c4508a590f1f16de9fa6e425f6afcd63f2081d97 100644
--- a/lib/modules/Thread.pmod
+++ b/lib/modules/Thread.pmod
@@ -781,6 +781,7 @@ class Fifo
 
   array try_read_array()
   {
+    array ret;
     switch (num) {
       case 0:
 	ret = ({});