Skip to content

Bugfix 20245#10

Open
mwieder wants to merge 3 commits intomontegoulding:masterfrom
mwieder:bugfix_20245
Open

Bugfix 20245#10
mwieder wants to merge 3 commits intomontegoulding:masterfrom
mwieder:bugfix_20245

Conversation

@mwieder
Copy link

@mwieder mwieder commented Aug 9, 2017

If JSONToArray is passed an empty parameter for the JSON object, the external fails to parse it and returns an error message. That ends up hanging the calling function and it isn't possible to edit the calling script because the engine is in a "script is still executing" state. The only way out is to force-quit LC and lose and unsaved changes. This PR just returns empty if the JSON parameter is empty and so avoids getting into the force-quit situation.

end if
end repeat
return(mergJSONEncode("pArray",pForceRootType,pPretty))
if pArray is not empty then
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@mwieder I'm fairly sure this is wrong and should be if pArray is an array then

end repeat
return(mergJSONEncode("pArray",pForceRootType,pPretty))
else
return empty
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hmm... empty is invalid JSON..... so I'm not convinced this is a good idea

@montegoulding
Copy link
Owner

@mwieder I think the only commit in this PR should be ff6cb0c. Could you cherry-pick that commit onto a clean master branch.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants