Since the author seems to have abandon this plugin, i took it upon myself to try to make a crude fix. This only kind of work, most users will not notice any problem.
I found the string variable that contained the long query argument and added a simple code that just truncated it. This means that only a part of the full error message will be printed out on the error page, but it is usually sufficient for one erroneous email. If the user had entered more then one erroneous email, the the error message will most probably be truncated in an obvious and ugly way. Still, it is better then no error page what so ever…
Here is what you need to do:
Download by-email.php file in /wp-content/plugins/invite-anyone/by-email/, change it by finding this part:
function invite_anyone_prepare_return_qs( $returned_data ) {
$qs = '';
foreach( $returned_data as $key => $value ) {
/*if ( is_array( $value ) ) {
$key .= '[]';
}*/
$qs = add_query_arg( $key, $value, $qs );
}
}
return $qs;
}
And change it to this:
function invite_anyone_prepare_return_qs( $returned_data ) {
$qs = '';
foreach( $returned_data as $key => $value ) {
/*if ( is_array( $value ) ) {
$key .= '[]';
}*/
$qs = add_query_arg( $key, $value, $qs );
}
$charset = 'UTF-8';
if(mb_strlen($qs, $charset) > 150) {
$qs = mb_substr($qs, 0, 150, $charset);
}
return $qs;
}
[Moderator Note: Please post code & markup between backticks (not double quotes) or use the code button. Your posted code may now have been permanently damaged by the forum’s parser.]
Upload and replace the old file on your server, and it should work!