Skip to content

Commit

Permalink
closes #256
Browse files Browse the repository at this point in the history
  • Loading branch information
gonzaloebiz committed Mar 22, 2018
1 parent 96b3ec6 commit 98a5b58
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Model/Config/Source/Interest.php
Original file line number Diff line number Diff line change
Expand Up @@ -51,13 +51,13 @@ public function __construct(

public function toOptionArray()
{
if (is_array($this->options)) {
if (is_array($this->options['categories'])&&count($this->options['categories'])) {
$rc = [];
foreach($this->options['categories'] as $interest) {
$rc[] = ['value'=> $interest['id'], 'label' => $interest['title']];
}
} else {
$rc[] = ['value' => 0, 'label' => __('---No Data---')];
$rc[] = ['value' => [], 'label' => __('---No Data---')];
}
return $rc;
}
Expand Down

0 comments on commit 98a5b58

Please sign in to comment.