diff --git a/lib/Gedmo/Loggable/Document/Repository/LogEntryRepository.php b/lib/Gedmo/Loggable/Document/Repository/LogEntryRepository.php index 3c94e7258b..34741d39c8 100644 --- a/lib/Gedmo/Loggable/Document/Repository/LogEntryRepository.php +++ b/lib/Gedmo/Loggable/Document/Repository/LogEntryRepository.php @@ -69,7 +69,7 @@ public function revert($document, $version = 1) $qb = $this->createQueryBuilder(); $qb->field('objectId')->equals($objectId); $qb->field('objectClass')->equals($objectMeta->name); - $qb->field('version')->lte($version); + $qb->field('version')->lte(intval($version)); $qb->sort('version', 'ASC'); $q = $qb->getQuery(); @@ -131,4 +131,4 @@ private function getLoggableListener() } return $this->listener; } -} \ No newline at end of file +}