From 76791f918f0a2114b9df1d99cc5c3278e9330d37 Mon Sep 17 00:00:00 2001 From: Ulrich Block Date: Fri, 22 Jan 2016 21:39:01 +0100 Subject: [PATCH] #707 Missing JSON conversion at API --- web/stuff/api/api_voice.php | 1 + 1 file changed, 1 insertion(+) diff --git a/web/stuff/api/api_voice.php b/web/stuff/api/api_voice.php index b78ffd8e..837bd17c 100644 --- a/web/stuff/api/api_voice.php +++ b/web/stuff/api/api_voice.php @@ -245,6 +245,7 @@ if (!isset($success['false']) and array_value_exists('action','add', $data) and $flexSlotsPercent = (isset($data['flexSlotsPercent']) and isid($data['flexSlotsPercent'], 3)) ? $data['flexSlotsPercent'] : $defaultFlexSlotsPercent; $autoRestart = (isset($data['autoRestart']) and active_check($data['autoRestart'])) ? $data['autoRestart'] : 'Y'; $initialpassword = passwordgenerate(10); + $iniConfiguration = (isset($iniConfiguration)) ? @json_encode($iniConfiguration) : ''; $query = $sql->prepare("INSERT INTO `voice_server` (`active`,`iniConfiguration`,`lendserver`,`backup`,`userid`,`masterserver`,`ip`,`port`,`slots`,`initialpassword`,`password`,`max_download_total_bandwidth`,`max_upload_total_bandwidth`,`localserverid`,`maxtraffic`,`forcebanner`,`forcebutton`,`forceservertag`,`forcewelcome`,`externalID`,`jobPending`,`serverCreated`,`flexSlots`,`flexSlotsFree`,`flexSlotsPercent`,`autoRestart`,`resellerid`) VALUES (?,?,?,?,?,?,?,?,?,?,?,?,?,0,?,?,?,?,?,?,'Y',NOW(),?,?,?,?,?)"); $query->execute(array($active, $iniConfiguration, $lendserver, $backup, $localUserLookupID, $hostID, $ip, $port, $slots, $initialpassword, $private, $max_download_total_bandwidth, $max_upload_total_bandwidth, $maxtraffic, $forcebanner, $forcebutton, $forceservertag, $forcewelcome, $externalServerID, $flexSlots, $flexSlotsFree, $flexSlotsPercent, $autoRestart, $resellerID));