From 9a29c61135a5d4f38b5d42da78626198daf56ec7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ste=CC=81phane=20PY?= Date: Wed, 1 Aug 2012 17:36:59 +0200 Subject: [PATCH] If ftp extension of php miss, it'll not throw exception --- DependencyInjection/Factory/FtpAdapterFactory.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/DependencyInjection/Factory/FtpAdapterFactory.php b/DependencyInjection/Factory/FtpAdapterFactory.php index c26ff36..9501280 100644 --- a/DependencyInjection/Factory/FtpAdapterFactory.php +++ b/DependencyInjection/Factory/FtpAdapterFactory.php @@ -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); })