JMSTranslationBundle
JMSTranslationBundle copied to clipboard
Solve #486 - Warning: Illegal offset type
Q | A |
---|---|
Bug fix? | yes |
New feature? | no |
BC breaks? | yes |
Deprecations? | no |
Tests pass? | yes/no |
Fixed tickets | #486 |
License | Apache2 |
Description
Resolve: Warning: Illegal offset type Resolve: FormExtrator must be changed to respect translation domains.
Todos
- [ x] Tests
- [ ] Documentation
- [ ] Changelog
This PR is out of date, but I get an error with the latest version of the bundle (1.5.4):
In FormExtractor.php line 295:
[Symfony\Component\Debug\Exception\FatalThrowableError]
strtolower() expects parameter 1 to be string, object given
which can be fixed by something mentioned in #486:
Translation/Extractor/File/FormExtractor.php:295
- if (!isset($returningMethods[strtolower($var->name)])) {
+ if (!isset($returningMethods[$var->name->toLowerString()])) {
@schmittjoh Should I make another PR?
Hi @mcorteel-harel yes please. I started to take care of this lib in the recent period, so if you have a fix fo this, it would be great!