Permalink
Browse files

Fix PHP notices

  • Loading branch information...
1 parent ad6e3ac commit 2cfbdf7d50acd71b0c65a78e4538328dac59db4c @chadsmith committed May 20, 2011
Showing with 9 additions and 7 deletions.
  1. +9 −7 applets/track/twiml.php
View
@@ -4,14 +4,16 @@
$title = AppletInstance::getValue('title');
$next = AppletInstance::getDropZoneUrl('next');
-$from = normalize_phone_to_E164($_REQUEST['From']);
-$to = normalize_phone_to_E164($_REQUEST['To']);
-$url = str_replace(array('%caller%', '%number%'), array($from, $to), $url);
-$title = str_replace(array('%caller%','%number%'), array($from, $to), $title);
+if(!empty($_REQUEST['From'])) {
+ $from = normalize_phone_to_E164($_REQUEST['From']);
+ $to = normalize_phone_to_E164($_REQUEST['To']);
+ $url = str_replace(array('%caller%', '%number%'), array($from, $to), $url);
+ $title = str_replace(array('%caller%','%number%'), array($from, $to), $title);
-include_once('Galvanize.php');
-@$GA = new Galvanize($account);
-@$GA->trackPageView($url, $title);
+ include_once('Galvanize.php');
+ @$GA = new Galvanize($account);
+ @$GA->trackPageView($url, $title);
+}
$response = new Response();

0 comments on commit 2cfbdf7

Please sign in to comment.