My WordPress powered website always worked great, however after the latest upgrade to 5.6.2 and 5.7 I have a major issue that actually breaks an important part of the website, I have seen to go through the logs and found the following error:
[14-Mar-2021 00:29:32 UTC] PHP Notice: Undefined offset: 0 in /var/www/html/wp-content/plugins/tours/includes/[login to view URL] on line 1709
[14-Mar-2021 00:29:32 UTC] selected_original_tours:
The code in question seems to be the following:
if($show_filter) {
$selected_destinations = isset($_GET['destinations']) ? explode(',', $_GET['destinations']) : [];
$selected_tourstyles = isset($_GET['tourstyles']) ? explode(',', $_GET['tourstyles']) : [];
write_log('selected_original_tours: ' . $selected_tourstyles[0]);
for($i = 0; $i < count($selected_tourstyles); $i++) {
$selected_tourstyles[$i] = str_replace('and', '&', $selected_tourstyles[$i]);
$selected_tourstyles[$i] = str_replace('_', ' ', $selected_tourstyles[$i]);
write_log('Selected_tourstyles:' . $selected_tourstyles[$i]);
}
$selected_dates = isset($_GET['dates']) ? explode(',', $_GET['dates']) : [];
}
The line in question will be this one:
write_log('selected_original_tours: ' . $selected_tourstyles[0]);
Please note that this code always worked under previous WordPress versions, however seems to break once engaging into 5.6.2 and 5.7 , so I need a developer that understands what is happening here. There will be no direct access to the server, all I can provide is the mentioned file that throws the error. Should be a very very quick fix for any experienced developer.
Please do not contact me with portfolios and canned messages, these will be ignored, thank you!
Hello sir I have read your requirements and I can start working on this project as soon as possible.
I can exactly do what you want me to do.
Please freely contact me here, thank you
$10 USD in 1 day
2.0 (1 review)
0.0
0.0
2 freelancers are bidding on average $13 USD for this job