From 7e04633b0d02f09c7a26b06094c7d4b68ab47157 Mon Sep 17 00:00:00 2001 From: Jo Hasenau Date: Sat, 1 Feb 2014 21:49:09 +0100 Subject: [PATCH] [TASK] Use (int) instead of intval() or (integer) This patch replaces most of around 1600 occurrences of intval() and every (integer) in the whole core. Additionally it changes GeneralUtility::intExplode to use references and typecasting as well. Some occurrences of strstr() together with intval() have been replaced with strpos() as well. And some superfluous intval calls have been removed or reduced to a single one i.e. for protected variables or before loops. Patch updated after Core CGL decision from 30.01.2014 Resolves: #54265 Releases: 6.2 Change-Id: Iba57ffad1f4233ffa1a9f7d3ca5bfe9d2b53f1e8 Reviewed-on: https://review.typo3.org/26740 Reviewed-by: Stefan Neufeind Tested-by: Stefan Neufeind --- Classes/FrontendEditPanel.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Classes/FrontendEditPanel.php b/Classes/FrontendEditPanel.php index 52c6067..5a9a10a 100644 --- a/Classes/FrontendEditPanel.php +++ b/Classes/FrontendEditPanel.php @@ -226,7 +226,7 @@ class FrontendEditPanel { if ($rParts[0] == 'pages') { $out = $this->editPanelLinkWrap_doWrap($string, $adminURL . 'db_new.php?id=' . $rParts[1] . '&pagesOnly=1', $currentRecord); } else { - if (!intval($nPid)) { + if (!(int)$nPid) { $nPid = \TYPO3\CMS\Core\Utility\MathUtility::canBeInterpretedAsInteger($rParts[1]) ? -$rParts[1] : $GLOBALS['TSFE']->id; } $out = $this->editPanelLinkWrap_doWrap($string, $adminURL . 'alt_doc.php?edit[' . $rParts[0] . '][' . $nPid . ']=new&noView=' . $nV, $currentRecord);