Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

Fix: logic exception thrown instead of a NotFoundHttpException #196

Merged
merged 1 commit into from

2 participants

@K-Phoen

In some specific cases (filter on a non-PK field, "with" option defined and non optionnal value), if the object to convert is not found a LogicException is raised instead a NotFoundHttpException one.

@willdurand willdurand merged commit 4986cc4 into propelorm:1.1

1 check passed

Details default The Travis build passed
@willdurand
Owner

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
This page is out of date. Refresh to see the latest.
Showing with 1 addition and 3 deletions.
  1. +1 −3 Request/ParamConverter/PropelParamConverter.php
View
4 Request/ParamConverter/PropelParamConverter.php
@@ -190,9 +190,7 @@ protected function findOneBy($classQuery, Request $request)
if (!$this->hasWith) {
return $query->findOne();
} else {
- $results = $query->find();
-
- return reset($results);
+ return $query->find()->first();
}
}
Something went wrong with that request. Please try again.