Closed dd32 closed 1 year ago
Related Warnings:
E_WARNING: array_unique() expects parameter 1 to be array, null given in wp-content/plugins/glotpress/gp-includes/warnings.php:521
E_WARNING: preg_match_all() expects parameter 2 to be string, array given in wp-content/plugins/glotpress/gp-includes/warnings.php:520
E_WARNING: strpos() expects parameter 1 to be string, array given in wp-content/plugins/glotpress/gp-includes/strings.php:7
E_WARNING: substr() expects parameter 1 to be string, array given in wp-content/plugins/glotpress/gp-includes/strings.php:11
E_WARNING: Invalid argument supplied for foreach() in wp-content/plugins/glotpress/gp-includes/warnings.php:417
E_WARNING: preg_match_all() expects parameter 2 to be string, array given in wp-content/plugins/glotpress/gp-includes/warnings.php:252
E_WARNING: mb_strlen() expects parameter 1 to be string, array given in wp-content/plugins/glotpress/gp-includes/warnings.php:214
E_WARNING: array_diff(): Expected parameter 2 to be an array, null given in wp-content/plugins/glotpress/gp-includes/warnings.php:523
All seem to be the same root-cause, so going back up the stack and validating the JSON file being imported seems the sanest choice.
I close this issue, as the PR that resolves this problem has been merged and released.
The following fatal error has happened on translate.wordpress.org a few times since #1450
It's caused by this:
So.. I suspect the issue is that a singular string has been translated into a plural in the source file, as
plural
isNULL
in that but an array of translations is being passed.. Not sure how/what/why.Looks like they're all JSON imports, so it might just be that the JSON parser isn't rejecting a badly formed file.