From dc8899659a7c846221538470b00f53333b1ded3b Mon Sep 17 00:00:00 2001 From: tund3r Date: Wed, 30 Aug 2017 23:22:23 -0400 Subject: [PATCH] Update twiml.php corrected bug that overwrite the message when the a sms applet forward the message to another applet --- OpenVBX/controllers/twiml.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/OpenVBX/controllers/twiml.php b/OpenVBX/controllers/twiml.php index e3a2261f..09d7358d 100644 --- a/OpenVBX/controllers/twiml.php +++ b/OpenVBX/controllers/twiml.php @@ -209,7 +209,11 @@ private function applet($flow_id, $inst_id, $type = 'voice') $applet->sms = $sms; if($sms) { - $_POST['Body'] = $_GET['Body'] = $_REQUEST['Body'] = $sms; + if (!isset($_REQUEST['Body'])) $_REQUEST['Body'] = $sms; +if (!isset($_POST['Body'])) $_POST['Body'] = $sms; +if (!isset($_GET['Body'])) $_GET['Body'] = $sms; + //If the instance is a forward the message get overwritten!!! + // $_POST['Body'] = $_GET['Body'] = $_REQUEST['Body'] = $sms; } $this->session->unset_userdata('sms-body');