1
0
mirror of https://github.com/e107inc/e107.git synced 2025-07-25 00:41:52 +02:00

Issue #5079 PHP Warning.

This commit is contained in:
camer0n
2023-10-30 07:28:14 -07:00
parent 81698566c0
commit 6d632320a6
2 changed files with 9 additions and 4 deletions

View File

@@ -2316,10 +2316,10 @@ class e_parse
// cleanup.
$newOpts = array(
'w' => (string) intval($options['w']),
'h' => (string) intval($options['h']),
'aw' => (string) intval($options['aw']),
'ah' => (string) intval($options['ah']),
'w' => isset($options['w']) ? (string) intval($options['w']) : '',
'h' => isset($options['h']) ? (string) intval($options['h']) : '',
'aw' => isset($options['aw']) ? (string) intval($options['aw']) : '',
'ah' => isset($options['ah']) ? (string) intval($options['ah']) : '',
'c' => strtoupper(vartrue($options['c'], '0')),
);

View File

@@ -1374,6 +1374,11 @@ EXPECTED;
'options' => array('w' => 222, 'h' => 272, 'aw' => 0, 'ah' => 0, 'c' => 0, 'type' => 'webp'),
'expected' => array('prefix' => 'thumb_butterfly_', 'suffix' => '.webp.cache.bin'),
),
2 => array(
'file' => 'e107_plugins/gallery/images/butterfly.jpg',
'options' => array('w' => 222, 'h' => 272, 'c' => 0, 'type' => 'webp'),
'expected' => array('prefix' => 'thumb_butterfly_', 'suffix' => '.webp.cache.bin'),
),
);