TO ARNE (AUTHOR): sitemap-core.php needs a min(..) on Line 570
-
on sitemap-core.php the original line is:
return round(($commentCount * 100 / $this->_totalComments) / 100, 1));
It should be:
return min(round(($commentCount * 100 / $this->_totalComments) / 100, 1),1);
The min() function ensures that the $commentCount doesnt exceed the $totalComment count. Some plugins out there have issues which cause the $commentCount to not quite match up with $totalComments and as such the priority may exceed 1.0. So the min() ensures the priority never goes over 1.0.
- The topic ‘TO ARNE (AUTHOR): sitemap-core.php needs a min(..) on Line 570’ is closed to new replies.