From 5fc6277d3f2b469eb2e4260f7cb6aa0665287009 Mon Sep 17 00:00:00 2001 From: Nadav Date: Fri, 26 Aug 2011 07:51:29 +0300 Subject: [PATCH] Oops, shouldn't have removed the condition completely... checking a parameter is provided --- lib/Doctrine/ORM/EntityRepository.php | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/lib/Doctrine/ORM/EntityRepository.php b/lib/Doctrine/ORM/EntityRepository.php index 1aa2faef7..3e1b83df6 100644 --- a/lib/Doctrine/ORM/EntityRepository.php +++ b/lib/Doctrine/ORM/EntityRepository.php @@ -203,6 +203,11 @@ class EntityRepository implements ObjectRepository "either findBy or findOneBy!" ); } + + + if (count($arguments) === 0) { + throw ORMException::findByRequiresParameter($method.$by); + } $fieldName = lcfirst(\Doctrine\Common\Util\Inflector::classify($by));