[TASK] Use $x[n] instead of substr($x, n, 1)
[Packages/TYPO3.CMS.git] / typo3 / sysext / lang / Classes / LanguageService.php
index 05e15ba..320e42a 100644 (file)
@@ -372,10 +372,10 @@ class LanguageService {
                                                        $type = $keyParts[1];
                                                }
                                                        // Detecting 'hidden' labels, converting to normal fieldname
-                                               if ($fieldName == '_') {
+                                               if ($fieldName === '_') {
                                                        $fieldName = '';
                                                }
-                                               if (substr($fieldName, 0, 1) == '_') {
+                                               if ($fieldName !== '' && $fieldName[0] === '_') {
                                                        $fieldName = substr($fieldName, 1);
                                                }
                                                        // Append label