prioriCalc no longer working correctly after #0013670 (Performance optimization: change while(list() to foreach())
As the topic already says, the changes in #22194 broke prioriCalc. The replacement of the while(list()) in method "calcPriority" of class.t3lib_div.php cause a wrong calculation.
Solution would be either to revert the changes from #22194 for class.t3lib_div.php or apply my attached patch, that's keeping the "foreach" loop instead "while(list())" but fixes the issue.
(issue imported from #M14488)