Search code examples
typo3typo3-6.1.xtypo3-6.2.x

Warning: Illegal string offset 'target' in typo3/sysext/lang/Classes/LanguageService.php


I'm updating a project from 4.5 to 6.2.9

One of my backend module shows this warning in core module. This is the area calls to the language module.

 $this->MOD_MENU = Array (
     "function" => Array (
         "1" => $LANG->getLL("function1"),
         "2" => $LANG->getLL("function2"),    
         "3" => $LANG->getLL("function3"),  

Any Ideas?


Solution

  • After two days of research and finding. A small line of mistake I could find in my index.php in my module directory [mod/index.php].

    I've included locallang.php file using

    require 'locallang.php';
    

    When I replace that with typo3 API function $GLOBALS['LANG']->includeLLFile it has been fixed.

    $GLOBALS['LANG']->includeLLFile("EXT:extension_directory/mod1/locallang.php");