: str_replace(): Passing null to parameter #2 ($replace) of type array|string is deprecated in
namespace NinjaForms\Blocks\DataBuilder;
public function __construct( $fields ) {
$fields = array_filter( $this->fields, function( $field ) {
return ! in_array( $field[ 'type' ], [ 'submit', 'html', 'hr' ] );
return array_map( [ $this, 'toArray' ], $fields );
protected function toArray( $field ) {