From a91c0da4c73d7df8dc8ad74f85a4fb055e59d75a Mon Sep 17 00:00:00 2001 From: James Finstrom Date: Tue, 1 Mar 2016 11:51:58 -0700 Subject: [PATCH] FREEPBX-11726 Fix whoops error when no sources are selected --- Superfecta.class.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Superfecta.class.php b/Superfecta.class.php index c66c01a7..4105ca8e 100644 --- a/Superfecta.class.php +++ b/Superfecta.class.php @@ -428,7 +428,7 @@ public function ajaxHandler() { } break; case "update_sources": - $sources = implode(",", $_REQUEST['data']); + $sources = isset($_REQUEST['data'])?implode(",", $_REQUEST['data']):''; $sql = "REPLACE INTO superfectaconfig (value, source, field) VALUES(?, ?, 'sources')"; $sth = $this->db->prepare($sql); $sth->execute(array($sources, 'base_'.$_REQUEST['scheme']));