I have an issue passing a variable to a PHP function. I'm running a Raspberry Pi webserver with PHP 7.0.33. Everything runs fine on the raspberry. When I upload my pages to my Godaddy server which is running PHP 7.2 I get the dreaded white page of death. I traced it down to the following. This is simplified.
On the raspberry:
This is how I'm sending the variables.
updateCustomer($uniqueid, $name, $title);
This is how I receive them in the function.
function updateCustomer($uniqueid, $name, $title, $job){
}
On the raspberry I send 3 vars ($uniqueid
, $name
, $title
). The function is looking for 4 vars ($uniqueid
, $name
, $title
, $job
) but ignores the last one ($job
) if it doesn't exist.
This will not work on the Godaddy server unless I send 4 vars and receive 4 vars. So for testing I just plugged in $x
like this and it works.
function updateCustomer($uniqueid, $name, $title, $x){
}
So my question...Is this a function difference between PHP 7.033 and the 7.2 that's running on Godaddy? Or is there a setting within the PHP setup that would allow this to work?