From d12b2003fb628864f7f323199f97001110d3baab Mon Sep 17 00:00:00 2001 From: Michiel Roos <michiel@maxserv.nl> Date: Wed, 12 Feb 2014 14:16:42 +0100 Subject: [PATCH] [BUGFIX] inval() -> (int) regressions in ternaries MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 | 2 +- .../Classes/Authentication/FrontendUserAuthentication.php | 2 +- .../Classes/ContentObject/Menu/AbstractMenuContentObject.php | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/typo3/sysext/core/Classes/Utility/GeneralUtility.php b/typo3/sysext/core/Classes/Utility/GeneralUtility.php index 9e84404672d8..deaa74153c67 100644 --- a/typo3/sysext/core/Classes/Utility/GeneralUtility.php +++ b/typo3/sysext/core/Classes/Utility/GeneralUtility.php @@ -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 diff --git a/typo3/sysext/frontend/Classes/Authentication/FrontendUserAuthentication.php b/typo3/sysext/frontend/Classes/Authentication/FrontendUserAuthentication.php index f5e92c18cf7c..2249b48c172f 100644 --- a/typo3/sysext/frontend/Classes/Authentication/FrontendUserAuthentication.php +++ b/typo3/sysext/frontend/Classes/Authentication/FrontendUserAuthentication.php @@ -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(); } diff --git a/typo3/sysext/frontend/Classes/ContentObject/Menu/AbstractMenuContentObject.php b/typo3/sysext/frontend/Classes/ContentObject/Menu/AbstractMenuContentObject.php index e551117eb1c5..0d05bb7a1f19 100644 --- a/typo3/sysext/frontend/Classes/ContentObject/Menu/AbstractMenuContentObject.php +++ b/typo3/sysext/frontend/Classes/ContentObject/Menu/AbstractMenuContentObject.php @@ -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; -- GitLab