Wrap post with empty array
I have a call to a php page that will sync my WebAssist contact us form to a CRM. I am doing a very simple test right now. The blank.php form loads, but gives me the error:
Warning: array_merge() [function.array-merge]: Argument #1 is not an array in /home/content/05/11651305/html/marketing1to1/x2/APIModel.php on line 255
I think that is occurring because the $_POST will not be populated when viewing the site with a GET request. It was suggest wrapping the contact create logic in some condition so that it is only evaluated on POST request submissions, something like below, but I keep getting errors doing this. Can you help me please?
if (!empty($_POST)) {
// ...
}