Merge branch '2.3'

* 2.3:
  [DoctrineBridge] Added type check to prevent calling clear() on arrays
  [Intl] Improved FormTypeCsrfExtension to use the type class as default intention if the form name is empty
  Fix docblock typo
This commit is contained in:
Fabien Potencier 2013-10-18 17:01:05 +02:00
commit 1206176fc4
2 changed files with 3 additions and 2 deletions

View File

@ -11,6 +11,7 @@
namespace Symfony\Bridge\Doctrine\Form\EventListener;
use Doctrine\Common\Collections\Collection;
use Symfony\Component\Form\FormEvents;
use Symfony\Component\Form\FormEvent;
use Symfony\Component\EventDispatcher\EventSubscriberInterface;
@ -40,7 +41,7 @@ class MergeDoctrineCollectionListener implements EventSubscriberInterface
// If all items were removed, call clear which has a higher
// performance on persistent collections
if ($collection && count($data) === 0) {
if ($collection instanceof Collection && count($data) === 0) {
$collection->clear();
}
}

View File

@ -291,7 +291,7 @@ abstract class AbstractRememberMeServices implements RememberMeServicesInterface
}
/**
* Checks whether remember-me capabilities where requested
* Checks whether remember-me capabilities were requested
*
* @param Request $request
*