Minor change if curl_exec() fails

Check that $result['json'] is set in initApp() function, if curl_exec() fails