Howdy,
I recently migrated a site, but having issues when I enable error logging (need it for other issue)
.
On the page with a gravity form I have this issue:
str_replace(): Passing null to parameter #2 ($replace) of type array|string is deprecated (View: /var/www/site/wp-content/themes/test-theme/theme/partials/pagebuilder.blade.php) (View: /var/www/site/wp-content/themes/test-theme/theme/partials/pagebuilder.blade.php)
/var/www/site/wp-content/plugins/gravityforms/includes/fields/class-gf-field-list.php
if ( is_array( $choice ) ) {
$choice_value = $choice['value'];
$choice_text = $choice['text'];
$choice_selected = array_key_exists( 'isSelected', $choice ) ? $choice['isSelected'] : false;
} else {
$choice_value = $choice;
$choice_text = $choice;
$choice_selected = false;
}
$is_selected = empty( $value ) ? $choice_selected : $choice_value == $value;
$selected = $is_selected ? "selected='selected'" : '';
$input .= "<option value='" . esc_attr( $choice_value ) . "' {$selected}>" . esc_html( $choice_text ) . '</option>';
}
$input .= '</select>';
break;
default :
// a11y: inputs without a label must have the aria-label attribute set.
$input = "<input {$invalid_attribute} {$required_attribute} {$aria_describedby} aria-label='" . esc_attr( str_replace( '{0}', $row, $aria_label_template ) ) . "' data-aria-label-template='" . esc_attr( $aria_label_template ) . "' type='text' name='input_{$this->id}[]' value='" . esc_attr( $value ) . "' {$tabindex} {$disabled} />";
break;
}
the section it’s highlighting is:
$input = "<input {$invalid_attribute} {$required_attribute} {$aria_describedby} aria-label='" . esc_attr( str_replace( '{0}', $row, $aria_label_template ) ) . "' data-aria-label-template='" . esc_attr( $aria_label_template ) . "' type='text' name='input_{$this->id}[]' value='" . esc_attr( $value ) . "' {$tabindex} {$disabled} />";
Any ideas how I can fix it?
I’m running Gravity Forms: 2.7.6