[TYPO3-core] RFC #15021: Cleanup: replace calls to t3lib_div::testInt with calls to is_int, mark t3lib_div:testInt as deprecated
Dmitry Dulepov
dmitry at typo3.org
Wed Jul 7 10:22:02 CEST 2010
Hi!
Michiel Roos [netcreators] wrote:
> I think a review of all the cases where the function is called is in
> order. I don't think all the places where it is called actually feed
> string data into the function.
I fully agree. I think core will benefit a lot if we use proper parameter
types. If function says "@param int", only integers must be sent to it and
there should be no further checks.
We may go even further and have a function that sets expected parameters to
proper types. For example:
t3lib_div::setParameterTypes(array(
'tx_myext_wjatever' => array(
'uid' => 'int'
)
));
A single call would ensure proper types and let developers get rid of all
intval() and testInt() calls.
--
Dmitry Dulepov
TYPO3 core&security teams member
Twitter: http://twitter.com/dmitryd
Read more @ http://dmitry-dulepov.com/
More information about the TYPO3-team-core
mailing list