[TYPO3-core] RFC #16375: Add a new TypoScript option "resolution" to the image resource

Dmitry Dulepov dmitry at typo3.org
Tue Nov 16 07:54:43 CET 2010


Hi!

Stefan Geith wrote:
> +				$resolution = intval($options['resolution']);
> +				$resolutionFactor = ($resolution>  35 ? $resolution / 72.0 : NULL);
> +				
> +					// check if original image is smaller than requested
> +				$origImageIsSmaller = ($resolutionFactor&&  $info[0]<= intval($data[0] * $resolutionFactor)&&  $info[1]<= intval($data[1] * $resolutionFactor));

-1 because this code can multiply numbers by NULL, which is... let's say, 
it is just bad coding.

$resolutionFactor must be a number. 0 would do, NULL would not, sorry. Such 
code is "no go" for the TYPO3 core regardless of who made the patch.

-- 
Dmitry Dulepov
TYPO3 core&security team member
Twitter: http://twitter.com/dmitryd
Read more @ http://dmitry-dulepov.com/


More information about the TYPO3-team-core mailing list