Skip to content

Commit d2f9c2a

Browse files
committed
update phpThumb to 1.7.24
1 parent fd08f0c commit d2f9c2a

5 files changed

Lines changed: 65 additions & 62 deletions

File tree

external/phpThumb/phpThumb.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -188,7 +188,7 @@ function RedirectToCachedFile() {
188188
$phpThumb->DebugMessage('PATH_INFO."w"x"h" set to "'.$_GET['w'].'"x"'.$_GET['h'].'"', __FILE__, __LINE__);
189189
}
190190
for ($i = 0; $i < count($args) - 2; $i++) {
191-
@list($key, $value) = explode('=', @$args[$i]);
191+
list($key, $value) = array_pad(explode('=', $args[$i]), 2, '');
192192
if (substr($key, -2) == '[]') {
193193
$array_key_name = substr($key, 0, -2);
194194
$_GET[$array_key_name][] = $value;
@@ -386,7 +386,7 @@ function RedirectToCachedFile() {
386386
$PHPTHUMB_DEFAULTS_DISABLEGETPARAMS = (bool) ($phpThumb->config_cache_default_only_suffix && (strpos($phpThumb->config_cache_default_only_suffix, '*') !== false));
387387

388388
// deprecated: 'err', 'file', 'goto',
389-
$allowedGETparameters = array('src', 'new', 'w', 'h', 'wp', 'hp', 'wl', 'hl', 'ws', 'hs', 'f', 'q', 'sx', 'sy', 'sw', 'sh', 'zc', 'ica', 'bc', 'bg', 'bgt', 'fltr', 'xto', 'ra', 'ar', 'aoe', 'far', 'iar', 'maxb', 'down', 'phpThumbDebug', 'hash', 'md5s', 'sfn', 'dpi', 'sia', 'nocache','err'); //fixme exp, add 'err'
389+
$allowedGETparameters = array('src', 'new', 'w', 'h', 'wp', 'hp', 'wl', 'hl', 'ws', 'hs', 'f', 'q', 'sx', 'sy', 'sw', 'sh', 'zc', 'ica', 'bc', 'bg', 'bgt', 'fltr', 'xto', 'ra', 'ar', 'aoe', 'far', 'iar', 'maxb', 'down', 'phpThumbDebug', 'hash', 'md5s', 'sfn', 'dpi', 'sia', 'nocache');
390390
foreach ($_GET as $key => $value) {
391391
if (substr($key,0,4) == 'amp;') $key = substr($key,4); //fixme exp
392392
if (!empty($PHPTHUMB_DEFAULTS_DISABLEGETPARAMS) && ($key != 'src')) {
@@ -609,7 +609,7 @@ function RedirectToCachedFile() {
609609
if (($phpThumb->w <= 0) || ($phpThumb->h <= 0)) {
610610
$phpThumb->ErrorImage('"w" and "h" parameters required for "new"');
611611
}
612-
@list($bghexcolor, $opacity) = explode('|', $_GET['new']);
612+
list($bghexcolor, $opacity) = array_pad(explode('|', $_GET['new']), 2, '');
613613
if (!phpthumb_functions::IsHexColor($bghexcolor)) {
614614
$phpThumb->ErrorImage('BGcolor parameter for "new" is not valid');
615615
}

external/phpThumb/phpthumb.bmp.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ public function getid3_bmp(&$BMPdata, &$ThisFileInfo, $ExtractPalette=false, $Ex
104104
$offset += 2;
105105

106106
if ($thisfile_bmp_header_raw['identifier'] != 'BM') {
107-
$ThisFileInfo['error'][] = 'Expecting "BM" at offset '. (int) (@$ThisFileInfo[ 'avdataoffset']) .', found "'. $thisfile_bmp_header_raw[ 'identifier'].'"';
107+
$ThisFileInfo['error'][] = 'Expecting "BM" at offset 0, found "'. $thisfile_bmp_header_raw[ 'identifier'].'"';
108108
unset($ThisFileInfo['fileformat']);
109109
unset($ThisFileInfo['bmp']);
110110
return false;

0 commit comments

Comments
 (0)