[BUGFIX] canBeInterpretedAsInteger fatals if given an object
authorPhilipp Gampe <forge.typo3.org@philippgampe.info>
Wed, 25 Jan 2012 18:05:16 +0000 (19:05 +0100)
committerSusanne Moog <typo3@susannemoog.de>
Thu, 26 Jan 2012 18:58:11 +0000 (19:58 +0100)
commit58ced3382693cc8b3b514ada609fcbda74aac4c6
tree0fa4ebc1097af22cb80a19970e833e972efefad6
parentbc878c70890942cc6a52e3348b93cacc21c70a85
[BUGFIX] canBeInterpretedAsInteger fatals if given an object

If an object without a string representation is given to
t3lib_utility_math::canBeInterpretedAsInteger($var), the
method will throw a fatal error.

Assume that an object or an array can never be an integer.
<http://php.net/manual/en/language.types.integer
.php#language.types.integer.casting.from-other>

Change-Id: I95e5fe6a5c9f798b5f249c3c14b8cfd4bedd3afe
Fixes: #33446
Releases: 4.6,4.7
Reviewed-on: http://review.typo3.org/8694
Reviewed-by: Tolleiv Nietsch
Tested-by: Tolleiv Nietsch
Reviewed-by: Susanne Moog
Tested-by: Susanne Moog
t3lib/utility/class.t3lib_utility_math.php
tests/t3lib/utility/class.t3lib_utility_mathTest.php
tests/t3lib/utility/fixture/t3lib_utility_math_fixture_classWithStringRepresentation.php [new file with mode: 0644]