1
Fork 1
mirror of https://git.lolcat.ca/lolcat/4get.git synced 2024-11-08 17:43:07 -05:00

split instances if string otherwise treat as array

This commit is contained in:
throwaway 2024-02-26 20:13:59 -08:00
parent c652e8e20f
commit ba5cd27007

View file

@ -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";
}
}