Skip to content

Commit

Permalink
Fix error when working with simple feature
Browse files Browse the repository at this point in the history
  • Loading branch information
gerardojbaez committed Aug 23, 2016
1 parent 5e80977 commit ac9ebb4
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions src/LaraPlans/Feature.php
Original file line number Diff line number Diff line change
Expand Up @@ -45,10 +45,13 @@ public function __construct($feature_code)

$feature = config('laraplans.features.'.$feature_code);

foreach ($feature as $key => $value)
if (is_array($feature))
{
if (property_exists($this, $key))
$this->$key = $value;
foreach ($feature as $key => $value)
{
if (property_exists($this, $key))
$this->$key = $value;
}
}
}

Expand Down

0 comments on commit ac9ebb4

Please sign in to comment.