Undefined offset: 0 in WordPress after latest version upgrade [closed]

Not all of us have a perfect encyclopedic knowledge of the internals. It would certainly help me (and probably others) to know which files these code blocks come from.

All I can tell you at the moment is that $selected_tourstyles is probably an empty array if it is an array at all.

To debug look for where $_GET['tourstyles'] is coming from. Probably a link or a form. It could be that the link or form is not getting the data to put into the query string.

You could try wrapping:

write_log('selected_original_tours: ' . $selected_tourstyles[0]);

with:

if(count($selected_tourstyles)>0){
    write_log('selected_original_tours: ' . $selected_tourstyles[0]);
}

This will only run that line if the array has something in it. I have no earthly idea if that will be good for the overall design of whatever this code does.