Skip to content

Commit

Permalink
I forgot to return the result in findOrCreate, thank goodness for uni…
Browse files Browse the repository at this point in the history
…t tests
  • Loading branch information
thinkingmedia committed Jun 27, 2016
1 parent 0010bf4 commit fab377d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/ORM/Table.php
Expand Up @@ -1222,7 +1222,7 @@ public function get($primaryKey, $options = [])
*/
public function findOrCreate($search, callable $callback = null)
{
$this->connection()->transactional(function () use ($search, $callback) {
return $this->connection()->transactional(function () use ($search, $callback) {
$query = $this->find()->where($search);
$row = $query->first();
if ($row) {
Expand Down

0 comments on commit fab377d

Please sign in to comment.