We've recently moved servers and have been noticing some weird problems. The main problem that we've noticed is that any variable where a null check is performed in php is being interpreted as a string.
e.g.
if($var == null){
//do something
}
The two key changes that have been made are: 1. Change from HTTP server to HTTPS 2. Change from php version, 5.3.14 to 5.3.13
The requests are made using jQuery.ajax post call.
My question is, are there any known problems/reasons why this is happening (such as the changes above) and is there anything that can be done to resolve the problem (with minimal changes).
As always Thanks for your responses!
Edit: Example
Js/jQuery
var test = null;
$.ajax({
url: 'functions.php',
data: { action: 'testNullFunction', testVar:test },
type: 'post',
success:
function (output) {
alert(output)
}})
Php:
if (isset($_POST['action']) && !empty($_POST['action'])) {
$action = $_POST['action'];
switch ($action) {
case 'testNullFunction':
if ($_POST['testVar']==null || is_null($_POST['testVar'])){
echo "its null";
}
break;