: str_replace(): Passing null to parameter #2 ($replace) of type array|string is deprecated in
class NF_Adapters_SubmissionsFields implements ArrayAccess, Iterator
protected $fields_by_key = [];
public function __construct($fields, $form_id)
foreach ($fields as $field) {
if (!isset($field['key'])) {
if (!method_exists($field, 'get_setting')) {
$key = $field->get_setting('key');
$this->fields_by_key[$key] = $field;
$fields_sorted = apply_filters('ninja_forms_get_fields_sorted', array(), $this->fields, $this->fields_by_key, $form_id);
if (!empty($fields_sorted)) {
$this->fields = $fields_sorted;
public function get_value($id)
return $this->fields[$id]['value'];
|--------------------------------------------------------------------------
|--------------------------------------------------------------------------
public function offsetSet($offset, $value)
$this->fields[] = $value;
$this->fields[$offset] = $value;
public function offsetExists($offset)
if (isset($this->fields[$offset])) {
if (isset($this->fields_by_key[$offset])) {
public function offsetUnset($offset)
unset($this->fields[ $offset ]);
public function offsetGet($offset)
if (isset($this->fields[$offset])) {
return $this->fields[$offset];
if (isset($this->fields_by_key[$offset])) {
return $this->fields_by_key[$offset];
|--------------------------------------------------------------------------
|--------------------------------------------------------------------------
return key($this->fields);
public function current()
return current($this->fields);
return current($this->fields);