mirror of
https://github.com/e107inc/e107.git
synced 2025-04-20 04:32:01 +02:00
Type checks and corrections for e_parse::thumbSrcSet()
This commit is contained in:
parent
207ce81106
commit
d1bdfb8546
@ -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
|
||||
|
@ -160,11 +160,13 @@ class e_formTest extends \Codeception\Test\Unit
|
||||
$this->assertTrue(false, "Couldn't load e_form object");
|
||||
}
|
||||
|
||||
include_once(e_CORE."templates/admin_icons_template.php");
|
||||
include_once(e_PLUGIN.'forum/forum_class.php');
|
||||
include_once(e_PLUGIN.'forum/templates/forum_icons_template.php');
|
||||
|
||||
$legacyDir = APP_PATH."/e107_files/downloadimages/";
|
||||
$legacyFile = APP_PATH."/e107_files/downloadimages/butterfly.jpg";
|
||||
|
||||
|
||||
|
||||
if(!is_dir($legacyDir))
|
||||
{
|
||||
mkdir($legacyDir, 0775, true);
|
||||
|
Loading…
x
Reference in New Issue
Block a user