Skip to content

Commit

Permalink
Fix database factory error for negative count values (#15779)
Browse files Browse the repository at this point in the history
  • Loading branch information
srmklive authored and taylorotwell committed Oct 6, 2016
1 parent 3138e40 commit 62cf7cd
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Illuminate/Database/Eloquent/FactoryBuilder.php
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ public function create(array $attributes = [])
*/
public function make(array $attributes = [])
{
if (! $this->amount) {
if ($this->amount < 1) {
return new Collection;
}

Expand Down

0 comments on commit 62cf7cd

Please sign in to comment.