Review main Abandoned

32386[BUGFIX] Fatal Error in AbstractPlugin if TypoScript Syntax Error in _LOCAL_LANG

Jonas Felix CR 0 V 0 Easy +1 −1 updated 02/28/15, 17:41

Commit message

Fatal Error "use string offset as array" if your have TypoScript Syntax Error in plugin.tx_xyz._LOCAL_LANG.
http://wiki.typo3.org/TypoScript_language_additions,_override

Testcase:

plugin.tt_news._LOCAL_LANG.de {
	asdf = asdf
	asdf = asdf
- End of file (no closing })

Of course this is not something that should happen, but it should never throw a Fatal Error.

Review

  • Code review CR 0
  • Verified V 0

Issues 1

Files 1

Review log 10

  1. Jonas Felix uploaded patch set 1 08/26/14, 12:34

  2. Markus Klein commented on patch set 1 CR -1 08/26/14, 17:20

    Thanks for your contribution, but I have some remarks. See comments please.
    "Releases:" line missing and lines are a bit too long. Please check the guidelines: http://wiki.typo3.org/CommitMessage_Format_%28Git%29

    AbstractPlugin.php:903

    I'm confused. How do you reach that point with $this->LOCAL_LANG[$this->LLkey][$key] not being an array?? Line 899 already checks if $this->LOCAL_LANG[$this->LLkey][$key][0]['target'] is not empty, hence $this->LOCAL_LANG[$this->LLkey][$key] is an array! Besides that, this check is not sufficient, as line 906 will still trigger a notice. IMO the main problem here is that there MUST NOT be a case where $this->LOCAL_LANG[$this->LLkey][$key] is set, but is not an array. Therefore you need to check the place, where this structure is created.
  3. Jonas Felix commented on patch set 1 08/28/14, 11:15

    > (2 comments) > > Thanks for your contribution, but I have some remarks. > See comments please. did you se my comments?

    Reply

    thank you for checking. sorry, my mistake I read them but didn't see this specific remarks. how can I change the old commit message?

    AbstractPlugin.php:903 Reply

    Your right. We didn't have the issue with 6.2.3 and this fix solved the problem of fatal error on typoscript syntax error in 6.2.4. So somewhere this case will be generated in a new change of 6.2.4. Do you tested my testcase?
  4. Markus Klein commented on patch set 1 09/01/14, 13:12

    See my note on forge please.

    Reply

    You can modify the commit message by either pushing a new patch set with new message (Important: the change-id must be PRESERVED!) or by using the edit function here on Gerrit.
  5. Mathias Schreiber updated the commit message in patch set 2 12/14/14, 16:24

  6. Markus Klein commented on patch set 2 CR -1 12/14/14, 18:50

    We have to re-evaluate whether this problem still exists or not. Moreover we need to fix the root cause and not the symptom.
  7. Mathias Schreiber wrote 12/18/14, 08:16

    Topic set to FE AbstractPlugin
  8. Benni Mack commented on patch set 2 01/29/15, 19:23

    Cannot reproduce this issue in master. tested with felogin and plugin.tx_felogin_pi1._LOCAL_LANG.default { ll_enter_your_data = BLABLACAR your_email = asdf username = MY USERNAME
  9. Benni Mack voted on patch set 2 V -1 01/29/15, 19:23

  10. Benni Mack abandoned the change 02/28/15, 17:41

    cannot reproduce, no reaction.