@@ -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 ' );
390390foreach ($ _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 }
0 commit comments