From cc8c5d2ffe70cf3825121173fcc8ed15a6cbcea6 Mon Sep 17 00:00:00 2001
From: Kim Alvefur <zash@zash.se>
Date: Sun, 8 Oct 2017 00:35:09 +0200
Subject: mod_pubsub: Correct traceback in loop invocation (data is the
 iterator, does not return one)

---
 plugins/mod_pubsub/pubsub.lib.lua | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/plugins/mod_pubsub/pubsub.lib.lua b/plugins/mod_pubsub/pubsub.lib.lua
index 25a534b6..57055462 100644
--- a/plugins/mod_pubsub/pubsub.lib.lua
+++ b/plugins/mod_pubsub/pubsub.lib.lua
@@ -358,7 +358,7 @@ local function simple_itemstore(archive, config, user, node, expose_publisher)
 		end
 		-- Workaround for buggy SQL drivers which require iterating until we get a nil.
 		local id, payload, when, publisher;
-		for a, b, c, d in data() do
+		for a, b, c, d in data do
 			id, payload, when, publisher = a, b, c, d;
 		end
 		module:log("debug", "Get item %s (published at %s by %s) from store %s", id, when, publisher, store);
-- 
cgit v1.2.3