File tree Expand file tree Collapse file tree 3 files changed +13
-6
lines changed
includes/formscrm-library Expand file tree Collapse file tree 3 files changed +13
-6
lines changed Original file line number Diff line number Diff line change 11<?php
22/**
33 * Plugin Name: FormsCRM
4- * Plugin URI : https : //close.technology/wordpress-plugins/formscrm/
4+ * Plugin URI : https: //close.technology/wordpress-plugins/formscrm/
55 * Description: Connects Forms with CRM, ERP and Email Marketing.
6- * Version : 4.0.5
7- * Author : CloseTechnology
8- * Author URI : https : //close.technology
6+ * Version: 4.0.5
7+ * Author: CloseTechnology
8+ * Author URI: https: //close.technology
99 * Text Domain: formscrm
1010 * Domain Path: /languages
11- * License : GPL-2.0+
12- * License URI: http : //www.gnu.org/licenses/gpl-2.0.txt
11+ * License: GPL-2.0+
12+ * License URI: http: //www.gnu.org/licenses/gpl-2.0.txt
1313 *
1414 * @package WordPress
1515 * @author CloseTechnology
Original file line number Diff line number Diff line change @@ -290,6 +290,9 @@ public function crm_process_entry( $contact_form ) {
290290
291291 // Create contact in CRM.
292292 $ this ->include_library ( $ crm_type );
293+ if ( empty ( $ this ->crmlib ) ) {
294+ return ;
295+ }
293296 $ merge_vars = $ this ->get_merge_vars ( $ cf7_crm , $ submission ->get_posted_data () );
294297 $ response_result = $ this ->crmlib ->create_entry ( $ cf7_crm , $ merge_vars );
295298
@@ -309,6 +312,9 @@ public function crm_process_entry( $contact_form ) {
309312 * @return array
310313 */
311314 public function get_merge_vars ( $ cf7_crm , $ submitted_data ) {
315+ if ( empty ( $ cf7_crm ) || ! is_array ( $ cf7_crm ) ) {
316+ return array ();
317+ }
312318 $ merge_vars = array ();
313319 foreach ( $ cf7_crm as $ key => $ value ) {
314320 if ( false === strpos ( $ key , 'fc_crm_field ' ) ) {
Original file line number Diff line number Diff line change @@ -91,6 +91,7 @@ WordPress installation and then activate the Plugin from Plugins page.
9191= 4.0.5 =
9292* Fixed: CF7 custom fields with select fields not sending.
9393* Added: Expert Mode.
94+ * Fixed: Fatal errors in CF7.
9495
9596= 4.0.4 =
9697* Added: Webhook to send form data received from CRM in GravityForms.
You can’t perform that action at this time.
0 commit comments