Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

nameAccepted() broke outputJson() sometimes #3104

Closed
TechCatOther opened this issue Feb 5, 2020 · 5 comments
Closed

nameAccepted() broke outputJson() sometimes #3104

TechCatOther opened this issue Feb 5, 2020 · 5 comments
Assignees

Comments

@TechCatOther
Copy link

I found that function nameAccepted() check for names and return errors on json_encode $name. But other users of nameAccepted write this error and $name of file to errors array, then try to json_encode it. As result nothing output in outputJSON().

'warning' => array ( 0 => 'errSave', 1 => '����������', ),

$out = json_encode($data);

@nao-pon
Copy link
Member

nao-pon commented Feb 6, 2020

@TechCatOther Does this issue occur when unpacking the archive? If so, this problem may occur if the file name in the archive is not UTF-8. Some measures may be required.

@nao-pon nao-pon self-assigned this Feb 6, 2020
@TechCatOther
Copy link
Author

Yes. It's happend when extract files from archive. Users got strange message about JSON, but all files with correct names already extracted.

@nao-pon
Copy link
Member

nao-pon commented Feb 6, 2020

@TechCatOther I tried to fix it. Can you verify with the following file?

@TechCatOther
Copy link
Author

Thanks a lot. Now extracting correct.

@nao-pon nao-pon closed this as completed in 5eade63 Feb 7, 2020
@nao-pon
Copy link
Member

nao-pon commented Feb 7, 2020

@TechCatOther Thank you for your verifying! I merged it to master branch.

# for free to join this conversation on GitHub. Already have an account? # to comment
Projects
None yet
Development

No branches or pull requests

2 participants