Browse Source

set category and type to always be string

ksieren 2 năm trước cách đây
mục cha
commit
b241501cf9
1 tập tin đã thay đổi với 4 bổ sung0 xóa
  1. 4 0
      Classes/Controller/SimpleController.php

+ 4 - 0
Classes/Controller/SimpleController.php

@@ -27,9 +27,13 @@ class SimpleController extends ActionController
     public function persistDataToDBAction($termsList, $category, $type, $url){
         if(!($category === '') && !($category === null)){
             $category = ($this->categoryRepository->findByUid($category))->getTitle();
+        } else {
+            $category = '';
         }
         if(!($type === '') && !($type === null)){
             $type = ($this->typeRepository->findByUid($type))->getTitle();
+        } else {
+            $type = '';
         }
         if($url === null){
             $url = '';