Hey,
When do you see this message?
What are the steps to reproduce it?
Does it only happen on a particular form or entry being viewed, or all forms or all pages etc?
I’ve looked at the line you mentioned and it could be caused by corrupt (or incorrect) entry data. So at a guess, you’re only seeing it on a particular entry or only entries that have been affected by what ever is going wrong.
I’m leaning towards something else is going on with your form that’s doing this, but if you can let me know more info I’ll see if I can reproduce it here.
If you’re stuck and not able to view an entry, you might be able to run a filter like below (i’ve only briefly tested it – and wouldn’t recommend leaving it active – only use it to retrieve the corrupt data).
add_filter( 'gform_get_field_value', 'itsg_fix_list_unserialize_error', 1, 3 );
function itsg_fix_list_unserialize_error( $value, $entry, $field ) {
if( 'list' == $field->get_input_type() ) {
$value = preg_replace_callback ( '!s:(\d+):"(.*?)";!', function( $match ) {
return ( $match[1] == strlen( $match[2] ) ) ? $match[0] : 's:' . strlen( $match[2] ) . ':"' . $match[2] . '";';
}, $value );
}
return $value;
}