Browse Source

Minor - fix php warning PHP 7.2

jmontoyaa 7 years ago
parent
commit
c736c5d453
1 changed files with 2 additions and 3 deletions
  1. 2 3
      main/lp/learnpath.class.php

+ 2 - 3
main/lp/learnpath.class.php

@@ -8103,7 +8103,6 @@ class learnpath
 
 
         $result = Database::query($sql);
         $result = Database::query($sql);
         $arrLP = [];
         $arrLP = [];
-
         while ($row = Database::fetch_array($result)) {
         while ($row = Database::fetch_array($result)) {
             $arrLP[] = [
             $arrLP[] = [
                 'id' => $row['iid'],
                 'id' => $row['iid'],
@@ -8123,7 +8122,7 @@ class learnpath
         }
         }
 
 
         $this->tree_array($arrLP);
         $this->tree_array($arrLP);
-        $arrLP = isset($this->arrMenu) ? $this->arrMenu : null;
+        $arrLP = isset($this->arrMenu) ? $this->arrMenu : [];
         unset($this->arrMenu);
         unset($this->arrMenu);
 
 
         $url = api_get_self().'?'.api_get_cidreq().'&action='.$action.'&type='.$item_type.'&lp_id='.$this->lp_id;
         $url = api_get_self().'?'.api_get_cidreq().'&action='.$action.'&type='.$item_type.'&lp_id='.$this->lp_id;
@@ -8398,7 +8397,7 @@ class learnpath
         }
         }
 
 
         $this->tree_array($arrLP);
         $this->tree_array($arrLP);
-        $arrLP = isset($this->arrMenu) ? $this->arrMenu : null;
+        $arrLP = isset($this->arrMenu) ? $this->arrMenu : [];
         unset($this->arrMenu);
         unset($this->arrMenu);
 
 
         if ($action == 'add') {
         if ($action == 'add') {