From: Anthony Talarico Date: Thu, 26 Oct 2017 20:10:42 +0000 (-0400) Subject: adding check to makesure there is a customfieldsdata array before trying to pull... X-Git-Tag: v1.0.4^2~20 X-Git-Url: http://cvs2.gaslightmedia.com/gitweb/?a=commitdiff_plain;h=1130d0d6507fa8def8a8bcb13d9fad274a3552fc;p=WP-Plugins%2Fglm-member-db-fields.git adding check to makesure there is a customfieldsdata array before trying to pull out the field fail for a new profile, there is no field fail data from a previous submission, adding a check to make sure there is a custom fields data array before trying to do any of the field fail logic --- diff --git a/views/admin/entity/fields.html b/views/admin/entity/fields.html index a00af22..0628ca7 100644 --- a/views/admin/entity/fields.html +++ b/views/admin/entity/fields.html @@ -5,10 +5,12 @@ {$fail = ''} - {if array_key_exists('fieldFail', $customFieldsData)} - {if array_key_exists($field.id,$customFieldsData['fieldFail'])} - {$fail = 'glm-form-bad-input'} - {/if} + {if is_array($customFieldsData)} + {if array_key_exists('fieldFail', $customFieldsData)} + {if array_key_exists($field.id,$customFieldsData['fieldFail'])} + {$fail = 'glm-form-bad-input'} + {/if} + {/if} {/if}
{if $field.field_type.name == 'text'}