JMSTranslationBundle icon indicating copy to clipboard operation
JMSTranslationBundle copied to clipboard

Solve #486 - Warning: Illegal offset type

Open pdias opened this issue 6 years ago • 2 comments

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

pdias avatar May 13 '18 16:05 pdias

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?

mcorteel-harel avatar May 01 '20 12:05 mcorteel-harel

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!

goetas avatar May 01 '20 19:05 goetas