Fixed javascript syntax error in jappixmini due to empty variable
authorhauke <hauke@grlg.org>
Thu, 10 Oct 2013 19:51:53 +0000 (21:51 +0200)
committerhauke <hauke@grlg.org>
Thu, 10 Oct 2013 19:51:53 +0000 (21:51 +0200)
jappixmini/jappixmini.php

index adbea67..ed7b68f 100644 (file)
@@ -499,6 +499,10 @@ function jappixmini_script(&$a,&$s) {
     $r = q("SELECT `username` FROM `user` WHERE `uid`=$uid");
     $nickname = json_encode($r[0]["username"]);
     $groupchats = get_config('jappixmini','groupchats');
+    //if $groupchats has no value jappix_addon_start will have an sytax error
+    if(!isset($groupchats)){
+       $groupchats = "{}";
+    }
 
     // add javascript to start Jappix Mini
     $a->page['htmlhead'] .= "<script type=\"text/javascript\">