1
Fork 0
mirror of https://git.lolcat.ca/lolcat/4get.git synced 2024-12-24 23:56:34 -05:00

Merge pull request 'split instances if string otherwise treat as array' (#4) from feature/fix_parse_instances into master

Reviewed-on: https://git.lolcat.ca/lolcat/4get/pulls/4
This commit is contained in:
lolcat 2024-02-27 04:32:52 +00:00
commit 3f88069d23

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