Not getting passed first search term in get function


#1
session_start(); require_once("twitteroauth/twitteroauth.php"); //Path to twitteroauth library header("Cache-control: private");

$_SESSION[‘post-data’] = $_POST;

$search1 = $_SESSION[‘post-data’][“search1”];
//$search1 = “orcfull”;
//$search2 = “djcad”;
//$or = “+OR+”;
$search2 = $_SESSION[‘post-data’][“search10”];

$notweets = 50;
$until = $_SESSION[‘post-data’][“untilTest”];
$since = $_SESSION[‘post-data’][“fromTest”];
$lat = $_SESSION[‘post-data’][“latTest”];
$long = $_SESSION[‘post-data’][“longTest”];

$consumerkey = “REMOVED”;
$consumersecret = “REMOVED”;
$accesstoken = “REMOVED”;
$accesstokensecret = “REMOVED”;

function getConnectionWithAccessToken($cons_key, $cons_secret, $oauth_token, $oauth_token_secret) {
$connection = new TwitterOAuth($cons_key, $cons_secret, $oauth_token, $oauth_token_secret);
return $connection;
}

$connection = getConnectionWithAccessToken($consumerkey, $consumersecret, $accesstoken, $accesstokensecret);

$search1 = str_replace("#", “%23”, $search1);
$search2 = str_replace("#", “%23”, $search2);

$tweets = $connection->get(“https://api.twitter.com/1.1/search/tweets.json?q=".$search1."+OR+".$search2."&since=".$since."&until=".$until."&geocode=".$lat.",".$long.",50mi&count=”.$notweets);



It then goes on to write to a JSON file.

For some reason, despite this working fine 2 days ago. I now can't seem to search properly.

When only search1 has content inside of it, it searches fine.
If search1 + seach2 have content, it returns this in my json file instead.

<code>{"statuses":[],"search_metadata":{"completed_in":0.011,"max_id":462222972657623040,"max_id_str":"462222972657623040","query":"test1+OR+test2","refresh_url":"?since_id=462222972657623040&q=test1%20OR%20test2&geocode=%2C%2C50mi&include_entities=1","count":50,"since_id":0,"since_id_str":"0"}}</code>

HOWEVER, If I put search1 + search2 and all other parameters, The search is fine?

I really can't figure out whats going on. 
Any ideas?