Closed jamesros161 closed 1 year ago
The following notice is generated when running PHP 8.2. PHP Deprecated: preg_replace(): Passing null to parameter #3 ($subject) of type array|string is deprecated
PHP Deprecated: preg_replace(): Passing null to parameter #3 ($subject) of type array|string is deprecated
This was backtraced to weforms/includes/fields/class-abstract-fields.php(446) : <label for="<?php echo isset( $field['name'] ) ? esc_attr( $field['name'] ) . '_' . esc_attr( $form_id ) : 'cls'; ?>"><?php echo esc_html( $field['label'] ) . wp_kses_post( $this->required_mark( $field ) ) ; ?></label>
<label for="<?php echo isset( $field['name'] ) ? esc_attr( $field['name'] ) . '_' . esc_attr( $form_id ) : 'cls'; ?>"><?php echo esc_html( $field['label'] ) . wp_kses_post( $this->required_mark( $field ) ) ; ?></label>
The issue is that the method required_mark() is returning null instead of an empty string.
required_mark()
This can be resolved with PR #203
The following notice is generated when running PHP 8.2.
PHP Deprecated: preg_replace(): Passing null to parameter #3 ($subject) of type array|string is deprecated
This was backtraced to weforms/includes/fields/class-abstract-fields.php(446) :
<label for="<?php echo isset( $field['name'] ) ? esc_attr( $field['name'] ) . '_' . esc_attr( $form_id ) : 'cls'; ?>"><?php echo esc_html( $field['label'] ) . wp_kses_post( $this->required_mark( $field ) ) ; ?></label>
The issue is that the method
required_mark()
is returning null instead of an empty string.This can be resolved with PR #203