From 1bb067b7badffa1f878ae2c246b3a181da5fd876 Mon Sep 17 00:00:00 2001 From: Tit Petric Date: Sun, 1 Jul 2018 01:45:06 +0200 Subject: [PATCH] allow empty structs --- sam/_gen.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sam/_gen.php b/sam/_gen.php index 67d36e671..0dfef5e4f 100755 --- a/sam/_gen.php +++ b/sam/_gen.php @@ -29,7 +29,7 @@ usort($apis, function($a, $b) { foreach (array("structs", "handlers", "interfaces", "request", "") as $type) { foreach ($apis as $api) { - if (!empty($api['struct'])) { + if (is_array($api['struct'])) { $name = ucfirst($api['interface']); $filename = str_replace("..", ".", strtolower($name) . "." . $type . ".go");