Add some typecasts to fix #15719 and other possible issues

Signed-off-by: William Desportes <williamdes@wdes.fr>
This commit is contained in:
William Desportes 2019-12-29 15:38:58 +01:00
parent b1e3f39bcb
commit de652cd95a
No known key found for this signature in database
GPG Key ID: 90A0EF1B8251A889
4 changed files with 10 additions and 10 deletions

View File

@ -34,10 +34,10 @@ $template = $containerBuilder->get('template');
$containerBuilder->set(
'browse_foreigners',
new BrowseForeigners(
$GLOBALS['cfg']['LimitChars'],
$GLOBALS['cfg']['MaxRows'],
$GLOBALS['cfg']['RepeatCells'],
$GLOBALS['cfg']['ShowAll'],
(int) $GLOBALS['cfg']['LimitChars'],
(int) $GLOBALS['cfg']['MaxRows'],
(int) $GLOBALS['cfg']['RepeatCells'],
(bool) $GLOBALS['cfg']['ShowAll'],
$GLOBALS['pmaThemeImage'],
$template
)

View File

@ -4449,7 +4449,7 @@ class Results
mb_substr(
(string) $column_for_first_row,
0,
$GLOBALS['cfg']['LimitChars']
(int) $GLOBALS['cfg']['LimitChars']
) . '...'
);
@ -4478,7 +4478,7 @@ class Results
mb_substr(
(string) $column_for_last_row,
0,
$GLOBALS['cfg']['LimitChars']
(int) $GLOBALS['cfg']['LimitChars']
) . '...'
);
@ -5682,7 +5682,7 @@ class Results
$str = mb_substr(
$str,
0,
$GLOBALS['cfg']['LimitChars']
(int) $GLOBALS['cfg']['LimitChars']
) . '...';
$truncated = true;
} else {

View File

@ -1354,7 +1354,7 @@ class Relation
mb_substr(
$value,
0,
$GLOBALS['cfg']['LimitChars']
(int) $GLOBALS['cfg']['LimitChars']
) . '...'
);
}

View File

@ -2972,7 +2972,7 @@ class Util
mb_substr(
$printtype,
0,
$GLOBALS['cfg']['LimitChars']
(int) $GLOBALS['cfg']['LimitChars']
) . '...'
);
$displayed_type .= '</abbr>';
@ -4448,7 +4448,7 @@ class Util
) {
$rows = $_SESSION['tmpval']['max_rows'];
} else {
$rows = $GLOBALS['cfg']['MaxRows'];
$rows = (int) $GLOBALS['cfg']['MaxRows'];
$_SESSION['tmpval']['max_rows'] = $rows;
}