[TYPO3-core] RFC #16375: Add a new TypoScript option "resolution" to the image resource
Stefan Geith
typo3dev2010.nospam1 at geithware.de
Tue Nov 16 08:50:47 CET 2010
Am 16.11.2010 07:54, schrieb Dmitry Dulepov:
> 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.
No, it can't, because: "( $resolutionFactor && "
> $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.
But I'll change this to 0 if needed...
/Stefan
More information about the TYPO3-team-core
mailing list