If ftp extension of php miss, it'll not throw exception

This commit is contained in:
Stéphane PY 2012-08-01 17:36:59 +02:00
parent b414f4f142
commit 9a29c61135

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); })