From ffac0cb20c7177b2dee6e58119e94d8d96dcc0fe Mon Sep 17 00:00:00 2001 From: "Nicolas A. Tonne" Date: Thu, 23 Oct 2014 20:50:10 +0200 Subject: [PATCH] fafk --- php/change.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/php/change.php b/php/change.php index 4986e1b4..47fd8526 100755 --- a/php/change.php +++ b/php/change.php @@ -20,12 +20,12 @@ $np = array_values($np); $firstSong = array_values($songs); $save = false; //declares the save variable, see further down for why -try{ +if(is_array($data["conf"]["views"])){ if(!in_array($guid, $data["conf"]["views"])){ //add viewer in viewers if not already in there array_push($data["conf"]["views"], $guid); file_put_contents($list, json_encode($data)); } -}catch(Exception $e){ +}else{ $data["conf"]["views"]=array($guid); file_put_contents($list, json_encode($data)); }