• Resolved Mike Meinz

    (@mikemeinz)


    The Query Monitor plugin reports these issues:

    htmlspecialchars(): Passing null to parameter #1 ($string) of type string is deprecated

    1. wp-content/plugins/attachments/classes/fields/class.field.text.php:44
    2. Attachments_Field_Text->format_value_for_input()
      wp-content/plugins/attachments/classes/fields/class.field.text.php:44
    3. Attachments->create_attachment_field()
      wp-content/plugins/attachments/classes/class.attachments.php:1268
    4. Attachments->create_attachment()
      wp-content/plugins/attachments/classes/class.attachments.php:1370
    5. Attachments->admin_footer()
      wp-content/plugins/attachments/classes/class.attachments.php:1464
Viewing 1 replies (of 1 total)
  • Thread Starter Mike Meinz

    (@mikemeinz)

    I solved this issue by replacing the format_value_for_input() line at 1268 in wp-content/plugins/attachments/classes/class.attachments.php with the following:

       if ($field->value === null) {
    $field->value = '';
    } else {
    $field->value = $field->format_value_for_input($field->value);
    }
Viewing 1 replies (of 1 total)

You must be logged in to reply to this topic.