[BUGFIX] Remove usage of deprecated intInRange for TYPO3 >= 6.0 50/30950/2
authorJost Baron <jost@netzkoenig.de>
Fri, 20 Jun 2014 15:01:27 +0000 (17:01 +0200)
committerIvan Dharma Kartolo <ivan.kartolo@gmail.com>
Thu, 30 Oct 2014 15:45:09 +0000 (16:45 +0100)
The extension crashes when trying to register in 6.2.

Fixes: #48885
Releases: 2.0
Change-Id: Ic7d447fe4ed97d92c89e82894bf929c488261d87
Reviewed-on: http://review.typo3.org/30950
Reviewed-by: Gernot Ploiner <gp@webprofil.at>
Tested-by: Gernot Ploiner <gp@webprofil.at>
Reviewed-by: Ivan Dharma Kartolo <ivan.kartolo@gmail.com>
Tested-by: Ivan Dharma Kartolo <ivan.kartolo@gmail.com>
fe_adminLib.inc

index e9fb517..3a3b115 100644 (file)
@@ -454,7 +454,13 @@ class user_feAdmin {
                                                        if (is_array($this->dataArr[$theField]))        {
                                                                $val = 0;
                                                                foreach ($this->dataArr[$theField] as $kk => $vv) {
-                                                                       $kk = t3lib_div::intInRange($kk,0);
+                                                                       if (t3lib_div::compat_version('6.0')) {
+                                                                               $kk = \TYPO3\CMS\Core\Utility\MathUtility::forceIntegerInRange($kk, 0);
+                                                                       }
+                                                                       else {
+                                                                               $kk = t3lib_div::intInRange($kk,0);
+                                                                       }
+
                                                                        if ($kk<=30)    {
                                                                                if ($vv)        {
                                                                                        $val|=pow(2,$kk);