Issues

ZF2-305: Zend\File\Transfer\Adapter\AbstractAdapter setTranslator

Issue Type: Bug Created: 2012-05-17T10:22:51.000+0000 Last Updated: 2012-05-18T16:38:15.000+0000 Status: Resolved Fix version(s): Reporter: Paulo Assis (assisp) Assignee: Maks 3w (maks3w) Tags: - Zend\File

Related issues: Attachments:

Description

When using an Adapter for a form Translator (e.g ArrayAdapter), if applying to a File Element, it fails with: Exception caught by form: Invalid translator specified and the form is not rendered.

After debugging this issue I found the problem at line 1101 of Zend\File\Transfer\Adapter\AbstractAdapter.php in function setTranslator

this reads:

} elseif ($translator instanceof AbstractAdapter) {

this makes no sense offcurse, it should read:

} elseif ($translator instanceof Translator\Adapter\AbstractAdapter) {

after fixing this line, the form with the file element will display fine with the translation working as expected.

Regards, Paulo

Comments

Posted by Maks 3w (maks3w) on 2012-05-17T11:12:09.000+0000

Hi Paulo,

If you want you can send a Pull Request directly to GitHub (https://github.com/zendframework/zf2)

You can find more info here http://framework.zend.com/wiki/display/…

Regards.

Posted by Maks 3w (maks3w) on 2012-05-17T11:35:22.000+0000

Finally I made the changes https://github.com/zendframework/zf2/pull/1246 because they are a little different from your proposal.

Posted by Maks 3w (maks3w) on 2012-05-18T16:38:15.000+0000

Fixed

Have you found an issue?

See the Overview section for more details.

Copyright

© 2006-2016 by Zend, a Rogue Wave Company. Made with by awesome contributors.

This website is built using zend-expressive and it runs on PHP 7.

Contacts