← All changes
|
includes/classes/integrations/class-notifier-fluentforms.php
+8
-4
2.7.5
→
3.1.1
View file →
| @@ -1,5 +1,9 @@ | ||
| 1 | 1 | <?php |
| 2 | +if ( ! defined( 'ABSPATH' ) ) { | |
| 3 | + exit; | |
| 4 | +} | |
| 5 | + | |
| 2 | 6 | /** |
| 3 | 7 | * FluentForms notifications |
| 4 | 8 | * |
| 5 | 9 | * @package Wa_Notifier |
| @@ -126,9 +130,9 @@ | ||
| 126 | 130 | } |
| 127 | 131 | } |
| 128 | 132 | }else if('input_image' === $value['element']) { |
| 129 | 133 | $field_type = 'image'; |
| 130 | - $field_name = $value['attributes']['name']; | |
| 134 | + $field_name = isset($value['attributes']['name']) ? $value['attributes']['name'] : ''; | |
| 131 | 135 | |
| 132 | 136 | if(!empty($value['settings']['label'])){ |
| 133 | 137 | $field_lbl = $value['settings']['label']; |
| 134 | 138 | }else if(!empty($value['settings']['admin_field_label'])){ |
| @@ -141,10 +145,10 @@ | ||
| 141 | 145 | 'label' => $field_lbl, |
| 142 | 146 | 'type' => $field_type, |
| 143 | 147 | ]; |
| 144 | 148 | }else { |
| 145 | - $field_type = !empty($value['attributes']['type'])?$value['attributes']['type']:'text'; | |
| 146 | - $field_name = $value['attributes']['name']; | |
| 149 | + $field_type = !empty($value['attributes']['type']) ? $value['attributes']['type'] : 'text'; | |
| 150 | + $field_name = isset($value['attributes']['name']) ? $value['attributes']['name'] : ''; | |
| 147 | 151 | |
| 148 | 152 | if(!empty($value['settings']['label'])){ |
| 149 | 153 | $field_lbl = $value['settings']['label']; |
| 150 | 154 | }else if(!empty($value['settings']['admin_field_label'])){ |
| @@ -149,9 +153,9 @@ | ||
| 149 | 153 | $field_lbl = $value['settings']['label']; |
| 150 | 154 | }else if(!empty($value['settings']['admin_field_label'])){ |
| 151 | 155 | $field_lbl = $value['settings']['admin_field_label']; |
| 152 | 156 | }else{ |
| 153 | - $field_lbl = 'lbl_'.$value['attributes']['name']; | |
| 157 | + $field_lbl = 'lbl_'.$field_name; | |
| 154 | 158 | } |
| 155 | 159 | |
| 156 | 160 | $fields_data[$field_name] = [ |
| 157 | 161 | 'label' => $field_lbl, |