[BUGFIX] Use `strpos()` over `strstr()` 45/61445/2
authorAndreas Fernandez <a.fernandez@scripting-base.de>
Mon, 5 Aug 2019 14:32:13 +0000 (16:32 +0200)
committerFrank Naegler <frank.naegler@typo3.org>
Fri, 23 Aug 2019 09:54:43 +0000 (11:54 +0200)
commitcde9c8c5540f0c41a557cb3b9d0582c8d3f36eaa
treec2c679ba122ba6a978ae7a517732d258088ef66e
parent895d737f47ff2b86a030ebec2a575cf718d01e82
[BUGFIX] Use `strpos()` over `strstr()`

This patch replaces all usages of `strstr()` and its friends where the
existence of a certain substring is checked, but the result isn't used at
all with `strpos()`, which uses less memory.

Resolves: #88922
Releases: master
Change-Id: Ie45589ac9410e22e1b48e82dd8086eadb6d74107
Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/61445
Tested-by: TYPO3com <noreply@typo3.com>
Tested-by: Anja Leichsenring <aleichsenring@ab-softlab.de>
Tested-by: Frank Naegler <frank.naegler@typo3.org>
Reviewed-by: Oliver Klee <typo3-coding@oliverklee.de>
Reviewed-by: Anja Leichsenring <aleichsenring@ab-softlab.de>
Reviewed-by: Frank Naegler <frank.naegler@typo3.org>
34 files changed:
typo3/sysext/backend/Classes/Controller/NewRecordController.php
typo3/sysext/backend/Classes/Form/FormDataProvider/AbstractItemProvider.php
typo3/sysext/backend/Classes/Utility/BackendUtility.php
typo3/sysext/core/Classes/Authentication/BackendUserAuthentication.php
typo3/sysext/core/Classes/Core/SystemEnvironmentBuilder.php
typo3/sysext/core/Classes/Database/QueryGenerator.php
typo3/sysext/core/Classes/Database/QueryView.php
typo3/sysext/core/Classes/Database/ReferenceIndex.php
typo3/sysext/core/Classes/Database/SoftReferenceIndex.php
typo3/sysext/core/Classes/Imaging/GraphicalFunctions.php
typo3/sysext/core/Classes/LinkHandling/LinkService.php
typo3/sysext/core/Classes/TypoScript/ExtendedTemplateService.php
typo3/sysext/core/Classes/TypoScript/TypoScriptService.php
typo3/sysext/core/Classes/Utility/VersionNumberUtility.php
typo3/sysext/frontend/Classes/ContentObject/ContentObjectRenderer.php
typo3/sysext/frontend/Classes/ContentObject/TemplateContentObject.php
typo3/sysext/frontend/Classes/Controller/ShowImageController.php
typo3/sysext/frontend/Classes/Controller/TypoScriptFrontendController.php
typo3/sysext/impexp/Classes/Import.php
typo3/sysext/impexp/Classes/ImportExport.php
typo3/sysext/indexed_search/Classes/Domain/Repository/IndexSearchRepository.php
typo3/sysext/indexed_search/Classes/Hook/CrawlerHook.php
typo3/sysext/indexed_search/Classes/Indexer.php
typo3/sysext/install/Classes/ExtensionScanner/Php/CodeStatistics.php
typo3/sysext/install/Classes/ExtensionScanner/Php/Matcher/AbstractCoreMatcher.php
typo3/sysext/install/Classes/FolderStructure/DirectoryNode.php
typo3/sysext/install/Classes/FolderStructure/FileNode.php
typo3/sysext/install/Classes/FolderStructure/LinkNode.php
typo3/sysext/install/Classes/Service/ExtensionConfigurationService.php
typo3/sysext/install/Classes/SystemEnvironment/Check.php
typo3/sysext/lowlevel/Classes/Integrity/DatabaseIntegrityCheck.php
typo3/sysext/lowlevel/Classes/Utility/ArrayBrowser.php
typo3/sysext/recordlist/Classes/Browser/FolderBrowser.php
typo3/sysext/reports/Classes/Report/Status/ConfigurationStatus.php