1
0
mirror of https://github.com/e107inc/e107.git synced 2025-08-23 06:33:22 +02:00

Type checks and corrections for e_parse::thumbSrcSet()

This commit is contained in:
Nick Liu
2020-01-17 21:16:20 +01:00
parent 207ce81106
commit d1bdfb8546
2 changed files with 7 additions and 4 deletions

View File

@@ -2999,6 +2999,7 @@ class e_parse extends e_parser
}
elseif($multiply === '2x' || $multiply === '3x' || $multiply === '4x')
{
$multiply = intval($multiply);
if(empty($parm['w']) && isset($parm['h']))
{
@@ -3006,8 +3007,8 @@ class e_parse extends e_parser
return $this->thumbUrl($src, $parm)." ".$parm['h']."h ".$multiply;
}
$width = (!empty($parm['w']) || !empty($parm['h'])) ? (intval($parm['w']) * $multiply) : (intval($this->thumbWidth) * $multiply);
$height = (!empty($parm['h']) || !empty($parm['w'])) ? (intval($parm['h']) * $multiply) : (intval($this->thumbHeight) * $multiply);
$width = !empty($parm['w']) ? (intval($parm['w']) * $multiply) : (intval($this->thumbWidth) * $multiply);
$height = !empty($parm['h']) ? (intval($parm['h']) * $multiply) : (intval($this->thumbHeight) * $multiply);
}
else