: str_replace(): Passing null to parameter #2 ($replace) of type array|string is deprecated in
// namespace NinjaForms\Pdf\Adapters;
final class NF_Adapters_SubmissionsSubmission extends NF_Adapters_SubmissionsFields
public function __construct($fields, $form_id, $submission)
parent::__construct($fields, $form_id);
$this->submission = $submission;
|--------------------------------------------------------------------------
|--------------------------------------------------------------------------
public function offsetExists($offset)
if (isset($this->fields[$offset])) {
return $this->offsetMaybeCreate($offset);
public function offsetGet($offset)
if (isset($this->fields[$offset])) {
return $this->fields[$offset];
return $this->offsetMaybeCreate($offset);
protected function offsetMaybeCreate($offset)
foreach ($this->fields as $field) {
if ($offset != $field->get_setting('key')) {
return $this->fields[$offset] = [
'id' => $field->get_id(),
'type' => $field->get_setting('type'),
'label' => $field->get_setting('label'),
'admin_label' => $field->get_setting('admin_label'),
'value' => $this->submission->get_field_value($field->get_id()),
'key' => $field->get_setting( 'key' ),
'options' => $field->get_setting( 'options' )
|--------------------------------------------------------------------------
|--------------------------------------------------------------------------
public function current()
$field = current($this->fields);
'id' => $field->get_id(),
'type' => $field->get_setting('type'),
'label' => $field->get_setting('label'),
'admin_label' => $field->get_setting('admin_label'),
'value' => $this->submission->get_field_value($field->get_id()),
'key' => $field->get_setting( 'key' ),
'options' => $field->get_setting( 'options' )