[CLEANUP] Replace strlen() with === for zero length check
It is faster to compare a string with === '' to find out if it's empty than to run strlen() on it. The replacement rules are applied as follows: * if (strlen($str)) => if ((string)$str !== '') * if (!is_string($str) || strlen($str) === 0) => if (!is_string($str) || $str === '') * If it can be seen easily that $str is a string, the typecast is omitted. Resolves: #54091 Releases: 6.2 Change-Id: I59c5cbccea4f98b8f282377e6aa67d970859a457 Reviewed-on: https://review.typo3.org/27091 Reviewed-by: Stefan Neufeind Tested-by: Stefan Neufeind
Showing
- typo3/sysext/backend/Classes/Configuration/TranslationConfigurationProvider.php 7 additions, 3 deletions...lasses/Configuration/TranslationConfigurationProvider.php
- typo3/sysext/backend/Classes/Controller/EditDocumentController.php 3 additions, 1 deletion...ext/backend/Classes/Controller/EditDocumentController.php
- typo3/sysext/backend/Classes/Controller/PageTreeNavigationController.php 1 addition, 1 deletion...ckend/Classes/Controller/PageTreeNavigationController.php
- typo3/sysext/backend/Classes/Controller/Wizard/FormsController.php 3 additions, 3 deletions...ext/backend/Classes/Controller/Wizard/FormsController.php
- typo3/sysext/backend/Classes/Form/Element/SuggestDefaultReceiver.php 2 additions, 2 deletions...t/backend/Classes/Form/Element/SuggestDefaultReceiver.php
- typo3/sysext/backend/Classes/Form/Element/TreeElement.php 1 addition, 1 deletiontypo3/sysext/backend/Classes/Form/Element/TreeElement.php
- typo3/sysext/backend/Classes/Form/FormEngine.php 2 additions, 2 deletionstypo3/sysext/backend/Classes/Form/FormEngine.php
- typo3/sysext/backend/Classes/Tree/View/AbstractTreeView.php 3 additions, 3 deletionstypo3/sysext/backend/Classes/Tree/View/AbstractTreeView.php
- typo3/sysext/backend/Classes/Utility/BackendUtility.php 3 additions, 3 deletionstypo3/sysext/backend/Classes/Utility/BackendUtility.php
- typo3/sysext/backend/Classes/View/PageLayoutView.php 2 additions, 2 deletionstypo3/sysext/backend/Classes/View/PageLayoutView.php
- typo3/sysext/core/Classes/Authentication/BackendUserAuthentication.php 2 additions, 2 deletions...core/Classes/Authentication/BackendUserAuthentication.php
- typo3/sysext/core/Classes/Cache/Backend/RedisBackend.php 2 additions, 2 deletionstypo3/sysext/core/Classes/Cache/Backend/RedisBackend.php
- typo3/sysext/core/Classes/Cache/Backend/Typo3DatabaseBackend.php 1 addition, 1 deletion...ysext/core/Classes/Cache/Backend/Typo3DatabaseBackend.php
- typo3/sysext/core/Classes/Charset/CharsetConverter.php 14 additions, 14 deletionstypo3/sysext/core/Classes/Charset/CharsetConverter.php
- typo3/sysext/core/Classes/Configuration/TypoScript/ConditionMatching/AbstractConditionMatcher.php 1 addition, 1 deletion...TypoScript/ConditionMatching/AbstractConditionMatcher.php
- typo3/sysext/core/Classes/Core/SystemEnvironmentBuilder.php 1 addition, 1 deletiontypo3/sysext/core/Classes/Core/SystemEnvironmentBuilder.php
- typo3/sysext/core/Classes/DataHandling/DataHandler.php 7 additions, 8 deletionstypo3/sysext/core/Classes/DataHandling/DataHandler.php
- typo3/sysext/core/Classes/Database/QueryGenerator.php 1 addition, 1 deletiontypo3/sysext/core/Classes/Database/QueryGenerator.php
- typo3/sysext/core/Classes/Database/QueryView.php 1 addition, 1 deletiontypo3/sysext/core/Classes/Database/QueryView.php
- typo3/sysext/core/Classes/Database/ReferenceIndex.php 4 additions, 4 deletionstypo3/sysext/core/Classes/Database/ReferenceIndex.php
Please register or sign in to comment