[TYPO3-core] RFC #15020: Enhancement of t3lib_div::testInt

Steffen Ritter info at rs-websystems.de
Wed Jul 7 10:31:09 CEST 2010


Am 07.07.2010 10:28, schrieb Steffen Ritter:
> Am 07.07.2010 10:21, schrieb Steffen Kamper:
>> it seems that t3lib_div::testInt was written for strings mainly.
>> The name of the function is misleading here.
>> What's about
>
> return ((string)intval($var) == $var);
>
> would be better i think, to enshure that $var is not casted to string
> but string compared
castet to int for shure i meant

reason: cast to int would work, even if there are some chars or one char 
in the string


More information about the TYPO3-team-core mailing list