diff --git a/src/Skobkin/Bundle/CopyPasteBundle/Command/DropExpiredCopypastesCommand.php b/src/Skobkin/Bundle/CopyPasteBundle/Command/DropExpiredCopypastesCommand.php index f165b6a..2696856 100644 --- a/src/Skobkin/Bundle/CopyPasteBundle/Command/DropExpiredCopypastesCommand.php +++ b/src/Skobkin/Bundle/CopyPasteBundle/Command/DropExpiredCopypastesCommand.php @@ -33,6 +33,7 @@ class DropExpiredCopypastesCommand extends ContainerAwareCommand $queryBuilder = $em->createQueryBuilder() ->delete('SkobkinCopyPasteBundle:Copypaste c') ->where('c.dateExpire < :now') + ->andWhere('c.dateExpire IS NOT NULL') ->setParameter('now', new \DateTime()); $queryBuilder->getQuery()->execute();