Plugin update errors
-
Hello @bastianonm,
I just created a very legacy migration from PHP 7.2 and WP 5.2, to 8.0/6.0 and I have a few notes that might be helpful to you and one issue. I have later tried this on 8.4/6.9 and reproduced them again.
2. I got this error:
( ! ) Fatal error: Uncaught ValueError: max(): Argument #1 ($value) must contain at least one element in D:\wamp\www\transkotd\wp-content\plugins\wp-gpx-maps\wp-gpx-maps-utils.php on line 389 ( ! ) ValueError: max(): Argument #1 ($value) must contain at least one element in D:\wamp\www\transkotd\wp-content\plugins\wp-gpx-maps\wp-gpx-maps-utils.php on line 389Which was resolved by this code replacing lines 378-390 in wp-gpx-maps-utils.
if (!empty($_ele)) {
/*
There might be cases where ele is not set in the gpx (0.00).
array_filter will filter out those values and as a consequence min()/max() would fail.
*/
$points->maxEle = max($_ele);
$points->minEle = min($_ele);
} else {
$points->maxEle = null;
$points->minEle = null;
}
if (!empty($_dist)) {
$points->totalLength = max($_dist);
} else {
$points->totalLength = 0;
}
if (!empty($_time)) {
$points->maxTime = max($_time);
$points->minTime = min($_time);
} else {
$points->maxTime = null;
$points->minTime = null;
}After that I refreshed the problematic pages, reverted the code and it didn’t have the issue.
2. Waypoints support doesn’t work. I get this console error:
Uncaught SyntaxError: Unexpected token '&'It’s because it turns the quotes to ascii symbols:
waypoints : [{"lat":42.58143997751176357269287109375,"lon":22.6101859845221042633056640625,"ele":1169,"time":"2021-04-22T08:58:31Z","name":"u0432u0440.......
You must be logged in to reply to this topic.