Skip to content

Commit fdb0d71

Browse files
fix fatal error because of wpforms changing parameter type
1 parent a4d39ae commit fdb0d71

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

integrations/wpforms/class-field.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -187,7 +187,7 @@ public function field_preview($field)
187187
* Field display on the form front-end.
188188
*
189189
* @since 1.0.0
190-
* @param array $field
190+
* @param null $field (deprecated)
191191
* @param array $form_data
192192
*/
193193
public function field_display($field, $field_atts, $form_data)
@@ -196,7 +196,7 @@ public function field_display($field, $field_atts, $form_data)
196196
$field_atts = array_merge([
197197
'input_class' => [],
198198
'input_id' => [],
199-
], $field_atts);
199+
], is_array($field_atts) ? $field_atts : []);
200200

201201
// Setup and sanitize the necessary data
202202
$field_required = ! empty($field['required']) ? ' required' : '';

0 commit comments

Comments
 (0)