Преглед изворни кода

split instances if string otherwise treat as array

throwaway пре 2 година
родитељ
комит
ba5cd27007
1 измењених фајлова са 2 додато и 1 уклоњено
  1. 2 1
      docker/gen_config.php

+ 2 - 1
docker/gen_config.php

@@ -68,7 +68,8 @@ continue;
                 $output = $output . "\tconst " . $key . " = " . type_to_string(detect_captcha_dirs()) . ";\n";
         }
         if($key === "INSTANCES") {
-                $output = $output . "\tconst " . $key . " = " . type_to_string(explode(',', $val)) . ";\n";
+                $instances_list = gettype($val) === "string" ? explode(",", $val) : $val;
+                $output = $output . "\tconst " . $key . " = " . type_to_string($instances_list) . ";\n";
         }
 
 }