Hi Ben
The statement on line 45 is:
setlocale( LC_ALL, $locale );
The $locale variable is set by this statement:
$locale = ( isset($_COOKIE[‘locale’]) )
? $_COOKIE[‘locale’]
: (isset( $_SERVER[‘HTTP_ACCEPT_LANGUAGE’] )
? $_SERVER[‘HTTP_ACCEPT_LANGUAGE’]
: ‘en_GB’
);
As you can see, it defaults to ‘en_GB’ will first try to obtain the locale value from your cookie (the one set by WordPress) or from the HTTP header value ‘HTTP_ACCEPT_LANGUAGE’ set by your browser.
My guess is that one of these values exceeds the length of a valid value permitted by the PHP ‘setlocale’ function (which is 255 characters).
This Stack Overflow post suggests that on some Linux operating systems distributions the locale is not stored as an array but instead a string and that this causes the error.
The issue is that I have not anticipated this possibility and it seem I should be checking for a string and converting it to an array and passing the array to the ‘setlocale’ function.
You immediate solution is to edit submissions.php and edit line 45 to read something like:
setlocale( LC_ALL, ‘en_GB’ );
In the meantime I will have to figure out how to replicate this scenartio.