You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
SyntaxError: invalid syntax (line 2)
(7 additional frame(s) were not displayed)
...
File "translate/storage/php.py", line 460, in parse
tree = parser.parse(phpsrc.decode(self.encoding), lexer=lexer, tracking=True)
File "ply/yacc.py", line 331, in parse
return self.parseopt(input, lexer, debug, tracking, tokenfunc)
File "ply/yacc.py", line 909, in parseopt
tok = call_errorfunc(self.errorfunc, errtoken, self)
File "ply/yacc.py", line 192, in call_errorfunc
r = errorfunc(token)
File "/home/weblate/weblate-env/lib/python3.7/site-packages/phply/phpparse.py", line 1632, in p_error
raise SyntaxError('invalid syntax', (None, t.lineno, None, t.value))
FileParseError: invalid syntax (line 2)
(7 additional frame(s) were not displayed)
...
File "weblate/trans/models/translation.py", line 293, in store
return self.load_store()
File "weblate/trans/models/translation.py", line 279, in load_store
template = self.component.template_store
File "django/utils/functional.py", line 48, in __get__
res = instance.__dict__[self.name] = self.func(instance)
File "weblate/trans/models/component.py", line 2719, in template_store
self.handle_parse_error(error)
File "weblate/trans/models/component.py", line 1560, in handle_parse_error
raise FileParseError(error_message)
The text was updated successfully, but these errors were encountered:
There is currently missing any validation when adding PHP strings. It will happily produce files which are not valid PHP, For example:
That in turn causes parse error when trying to load such file:
Sentry Issue: WEBLATE-5HA
The text was updated successfully, but these errors were encountered: