This comes from the error reporting values being different in the different environments.
ini_set( 'error_reporting', E_ALL );
ini_set( 'display_errors' , 1 );
Make all errors appear.
echo $test['a'];
would throw an error if I hadn't assigned $test['a'] beforehand. Nothing to do with mysql. It's also the same with saying $a = $_GET['a'] if there is no param passed in the url called a.
Eg. for a get call you'd build a wrapper somewhere with the following.
function Get( $param )
{
if( isset( $GET[$param ] ) )
return $GET[$param ];
else
return null/""/false or whatever
}
Bit of a funny one as it is best practice to check for the existence of things instead of relying on the dynamic creation of them as it does catch some of the harder errors to spot due to mispelling etc .