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; }