KevinTheJedi
IIS shouldn't be messing with anything, we run similar processes to talk to multiple API's through JSON payloads and it hasn't proved to be an obstacle before.
I've actually managed to solve the issue myself by manually editing code within \include\class.forms.php to circumvent the error. Following the stack trace the problem is occurring at line 5369:
if ($_SERVER['REQUEST_METHOD'] == 'POST') {
$_files = array();
foreach ($files as $info) {
if (@list($id, $name) = explode(',', $info, 2))
$_files[$id] = $name;
}
$files = $_files;
}
Doing a var_dump() of $info inside of the loop revealed that it is an array, which is causing the error inside of explode(). I solved the issue by adding a line to implode (even though it's a bit silly to implode then explode):
if ($_SERVER['REQUEST_METHOD'] == 'POST') {
$_files = array();
foreach ($files as $info) {
$info = implode(',', $info);
if (@list($id, $name) = explode(',', $info, 2))
$_files[$id] = $name;
}
$files = $_files;
}
After running the exact same JSON payload, the ticket was uploaded successfully with the proper attachment. I'll be doing further testing but it seems like I've managed to duct tape it together for now at least. I'm not sure if $files is meant to be a string instead of an array coming into this function, perhaps some kind of conversion condition failed due to some weird setting in my installation since it works for you without issue, but this is my culprit in any case.