Merge pull request #17 from rezzza/php_without_ftp

If ftp extension of php miss, it'll not throw exception
This commit is contained in:
Antoine Hérault 2012-08-02 05:22:48 -07:00
commit ca477696cc

View File

@ -53,7 +53,7 @@ class FtpAdapterFactory implements AdapterFactoryInterface
->booleanNode('passive')->defaultFalse()->end()
->booleanNode('create')->defaultFalse()->end()
->scalarNode('mode')
->defaultValue(FTP_ASCII)
->defaultValue(defined('FTP_ASCII') ? FTP_ASCII : null)
->beforeNormalization()
->ifString()
->then(function($v) { return constant($v); })