[TASK] Use strpos instead of substr to check the start of a string 77/49677/3
authorWouter Wolters <typo3@wouterwolters.nl>
Wed, 31 Aug 2016 09:49:51 +0000 (11:49 +0200)
committerPhilipp Gampe <philipp.gampe@typo3.org>
Thu, 1 Sep 2016 18:11:27 +0000 (20:11 +0200)
commitad81643887030e0945127f69b6f285c30415d39d
treed2529dc568f9aabaff201c82f11804a59942c92f
parent6816f1d49fd216133c94fd1a5d94b120591984d4
[TASK] Use strpos instead of substr to check the start of a string

Substr invokes additional memory allocation, which is not needed
in the context. Strpos will do the same job, but without any
overhead (it's just searching a string).

Resolves: #77752
Releases: master
Change-Id: I7f11a74508ba959628d6af1b1c00b21f882114cd
Reviewed-on: https://review.typo3.org/49677
Tested-by: Bamboo TYPO3com <info@typo3.com>
Reviewed-by: Sascha Egerer <sascha@sascha-egerer.de>
Reviewed-by: Stefan Neufeind <typo3.neufeind@speedpartner.de>
Reviewed-by: Andreas Fernandez <typo3@scripting-base.de>
Reviewed-by: Philipp Gampe <philipp.gampe@typo3.org>
Tested-by: Philipp Gampe <philipp.gampe@typo3.org>
typo3/sysext/backend/Classes/Template/DocumentTemplate.php
typo3/sysext/core/Classes/Page/PageRenderer.php
typo3/sysext/core/Classes/Resource/ResourceCompressor.php
typo3/sysext/core/Classes/TypoScript/TemplateService.php
typo3/sysext/frontend/Classes/Controller/TypoScriptFrontendController.php
typo3/sysext/rtehtmlarea/Classes/Controller/AccessibilityLinkController.php
typo3/sysext/rtehtmlarea/Classes/Form/Element/RichTextElement.php
typo3/sysext/rtehtmlarea/Classes/RteHtmlAreaApi.php