projects
/
WP-Plugins
/
glm-member-db-leads.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
387c8c5
)
clean up errors
author
Steve Sutton
<steve@gaslightmedia.com>
Mon, 11 Jul 2016 13:26:26 +0000
(09:26 -0400)
committer
Steve Sutton
<steve@gaslightmedia.com>
Mon, 11 Jul 2016 13:26:26 +0000
(09:26 -0400)
When adding form it was giving error message about variables.
Cleaned up the code to check for the variables first.
setup/frontHooks.php
patch
|
blob
|
history
diff --git
a/setup/frontHooks.php
b/setup/frontHooks.php
index
115e344
..
760a2b6
100644
(file)
--- a/
setup/frontHooks.php
+++ b/
setup/frontHooks.php
@@
-159,8
+159,8
@@
add_action( 'gform_after_submission', function( $entry, $form ){
array(
'email' => $glm_leads_entry['email'],
'created' => $entry['date_created'],
- 'mail_ok' => ( $glm_leads_entry['mail_ok'] ) ? 1: 0,
- 'member_ok' => ( $glm_leads_entry['member_ok'] ) ? 1: 0,
+ 'mail_ok' => (
isset( $glm_leads_entry['mail_ok'] ) &&
$glm_leads_entry['mail_ok'] ) ? 1: 0,
+ 'member_ok' => (
isset( $glm_leads_entry['member_ok'] ) &&
$glm_leads_entry['member_ok'] ) ? 1: 0,
), // data
array( '%s', '%s', '%s', '%s' ) // data format
);