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:


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


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 (

You can find more info here…


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

Finally I made the changes because they are a little different from your proposal.

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


Have you found an issue?

See the Overview section for more details.


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

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