From bac0e6bcc5c728f702c7bd4daae3361038f5c436 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Marek=20Vavru=C5=A1a?= Date: Tue, 19 Jun 2018 14:50:20 -0700 Subject: [PATCH] policy: fix incompatibility with default (nil) phase The `{ nil }` would otherwise get interpreted as an empty table. --- modules/policy/policy.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/policy/policy.lua b/modules/policy/policy.lua index b1f55e16a..9db1fc68c 100644 --- a/modules/policy/policy.lua +++ b/modules/policy/policy.lua @@ -635,7 +635,7 @@ function policy.add(rule, phase) -- End of compatibility shim local desc = {id=getruleid(), cb=rule, count=0} if type(phase) ~= 'table' then - phase = {phase} + phase = {phase or 'begin'} end -- Allow multiple phases for the same rule for _, p in ipairs(phase) do -- 2.47.2