Fixed bug #15685: Enhancement of t3lib_div::testInt (#15020) introduced a different...
authorErnesto Baschny <ernst@cron-it.de>
Wed, 22 Sep 2010 09:22:33 +0000 (09:22 +0000)
committerErnesto Baschny <ernst@cron-it.de>
Wed, 22 Sep 2010 09:22:33 +0000 (09:22 +0000)
git-svn-id: https://svn.typo3.org/TYPO3v4/Core/branches/TYPO3_4-4@8859 709f56b5-9817-0410-a4d7-c38de5d9e867

ChangeLog
t3lib/class.t3lib_div.php

index 39cbf21..8b26919 100755 (executable)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2010-09-22  Ernesto Baschny <ernst@cron-it.de>
+
+       * Fixed bug #15685: Enhancement of t3lib_div::testInt (#15020) introduced a different behaviour. This restores original behaviour. (Thanks to Helmut Hummel)
+
 2010-09-22  Steffen Kamper  <steffen@typo3.org>
 
        * Fixed bug #15465: sys_action: setting mountpoints as non-admin (Thanks to Georg Ringer)
index a0ee62f..e382e07 100644 (file)
@@ -1264,7 +1264,10 @@ final class t3lib_div {
         * @return      boolean         Returns true if string is an integer
         */
        public static function testInt($var) {
-               return (string)intval($var) == $var;
+               if ($var === '') {
+                       return FALSE;
+               }
+               return (string)intval($var) === (string)$var;
        }
 
        /**