Fixed bug #15685: Enhancement of t3lib_div::testInt (#15020) introduced a different...
[Packages/TYPO3.CMS.git] / t3lib / class.t3lib_div.php
index e08fff7..3faf554 100644 (file)
@@ -1279,7 +1279,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;
        }
 
        /**