From 98a5b5886324469d836ca03dd974347594f13661 Mon Sep 17 00:00:00 2001 From: gonzalo Date: Thu, 22 Mar 2018 19:45:34 -0300 Subject: [PATCH] closes #256 --- Model/Config/Source/Interest.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Model/Config/Source/Interest.php b/Model/Config/Source/Interest.php index 5ff99829..57cea285 100644 --- a/Model/Config/Source/Interest.php +++ b/Model/Config/Source/Interest.php @@ -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; }