Add sanity checking for max_count

We use it later for division, so make sure it's good for it.

Fixes #13470

Signed-off-by: Michal Čihař <michal@cihar.com>
This commit is contained in:
Michal Čihař 2017-07-10 15:26:47 +02:00
parent bd2a0ec307
commit 59d0a9fe86

View File

@ -2408,6 +2408,13 @@ class Util
$classes = array()
) {
// This is often coming from $cfg['MaxTableList'] and
// people sometimes set it to empty string
$max_count = intval($max_count);
if ($max_count <= 0) {
$max_count = 250;
}
$class = $frame == 'frame_navigation' ? ' class="ajax"' : '';
$list_navigator_html = '';