[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. Change-Id: I888d70e42f925bd57ad23b873b72d6a38acb39ef Resolves: #54091 Releases: master Reviewed-on: http://review.typo3.org/27794 Reviewed-by:Mathias Schreiber <mathias.schreiber@wmdb.de> Tested-by:
Mathias Schreiber <mathias.schreiber@wmdb.de> Reviewed-by:
Stefan Neufeind <typo3.neufeind@speedpartner.de> Tested-by:
Stefan Neufeind <typo3.neufeind@speedpartner.de>
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/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/Core/SystemEnvironmentBuilder.php 1 addition, 1 deletiontypo3/sysext/core/Classes/Core/SystemEnvironmentBuilder.php
- typo3/sysext/core/Classes/DataHandling/DataHandler.php 7 additions, 5 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
- typo3/sysext/core/Classes/Database/SoftReferenceIndex.php 6 additions, 6 deletionstypo3/sysext/core/Classes/Database/SoftReferenceIndex.php
- typo3/sysext/core/Classes/Database/SqlParser.php 18 additions, 18 deletionstypo3/sysext/core/Classes/Database/SqlParser.php
Please register or sign in to comment