[BUGFIX] inval() -> (int) regressions in ternaries 76/27576/5
authorMichiel Roos <michiel@maxserv.nl>
Wed, 12 Feb 2014 13:16:42 +0000 (14:16 +0100)
committerHelmut Hummel <helmut.hummel@typo3.org>
Wed, 12 Feb 2014 16:18:57 +0000 (17:18 +0100)
Change-Id: I0c105134ca9de463eed7c6a3760003b8694958ce
Resolves: #55923
Releases: 6.2
Reviewed-on: https://review.typo3.org/27576
Reviewed-by: Marcin SÄ…gol
Reviewed-by: Markus Klein
Tested-by: Markus Klein
Reviewed-by: Helmut Hummel
Tested-by: Helmut Hummel
typo3/sysext/core/Classes/Utility/GeneralUtility.php
typo3/sysext/frontend/Classes/Authentication/FrontendUserAuthentication.php
typo3/sysext/frontend/Classes/ContentObject/Menu/AbstractMenuContentObject.php

index 9e84404..deaa741 100644 (file)
@@ -3054,7 +3054,7 @@ Connection: close
         */
        static public function getMaxUploadFileSize($localLimit = 0) {
                // Don't allow more than the global max file size at all
-               $t3Limit = (int)$localLimit > 0 ? $localLimit : $GLOBALS['TYPO3_CONF_VARS']['BE']['maxFileSize'];
+               $t3Limit = (int)($localLimit > 0 ? $localLimit : $GLOBALS['TYPO3_CONF_VARS']['BE']['maxFileSize']);
                // As TYPO3 is handling the file size in KB, multiply by 1024 to get bytes
                $t3Limit = $t3Limit * 1024;
                // Check for PHP restrictions of the maximum size of one of the $_FILES
index f5e92c1..2249b48 100644 (file)
@@ -470,7 +470,7 @@ class FrontendUserAuthentication extends \TYPO3\CMS\Core\Authentication\Abstract
         * @return void
         */
        public function gc() {
-               $timeoutTimeStamp = (int)$GLOBALS['EXEC_TIME'] - $this->sessionDataLifetime;
+               $timeoutTimeStamp = (int)($GLOBALS['EXEC_TIME'] - $this->sessionDataLifetime);
                $GLOBALS['TYPO3_DB']->exec_DELETEquery('fe_session_data', 'tstamp < ' . $timeoutTimeStamp);
                parent::gc();
        }
index e551117..0d05bb7 100644 (file)
@@ -839,8 +839,8 @@ class AbstractMenuContentObject {
                        }
                        $c = 0;
                        $c_b = 0;
-                       $minItems = (int)$this->mconf['minItems'] ? $this->mconf['minItems'] : $this->conf['minItems'];
-                       $maxItems = (int)$this->mconf['maxItems'] ? $this->mconf['maxItems'] : $this->conf['maxItems'];
+                       $minItems = (int)($this->mconf['minItems'] ?: $this->conf['minItems']);
+                       $maxItems = (int)($this->mconf['maxItems'] ?: $this->conf['maxItems']);
                        $begin = $this->parent_cObj->calc($this->mconf['begin'] ? $this->mconf['begin'] : $this->conf['begin']);
                        $minItemsConf = isset($this->mconf['minItems.']) ? $this->mconf['minItems.'] : (isset($this->conf['minItems.']) ? $this->conf['minItems.'] : NULL);
                        $minItems = is_array($minItemsConf) ? $this->parent_cObj->stdWrap($minItems, $minItemsConf) : $minItems;