schmittjoh / JMSTranslationBundle

Puts the Symfony2 Translation Component on steroids
http://jmsyst.com/bundles/JMSTranslationBundle
426 stars 292 forks source link

Fixed object instead of string error introduced by strict_types #533

Closed ViniTou closed 4 years ago

ViniTou commented 4 years ago
Q A
Bug fix? yes
New feature? no
BC breaks? no
Deprecations? no
Tests pass? yes
Fixed tickets
License Apache2

Description

When extracting transalations with --dir option, following error is thrown simplexml_load_file() expects parameter 1 to be a valid path, object given

This was introduced with adding strict_types, as simplexml_load_file expects string, but resource object is given. As it have __toString() method it explains how it worked before and how to fix this issue rather easly.

Todos

~- [ ] Tests~ ~- [ ] Documentation~ ~- [ ] Changelog~

franmomu commented 4 years ago

Thanks for the fix! I was trying to add some test, looks like here should be casted to string as well.

ViniTou commented 4 years ago

Thanks for the fix! I was trying to add some test, looks like here should be casted to string as well.

Yup, fixed!

goetas commented 4 years ago

thanks