Skip to content

Error with non-existing array offset  #2

@jhtjards

Description

@jhtjards

Hi, thanks for creating this Plugin!

I've come across an issue where the plugin triggered a fatal error in class-sippis-acf-field-network-post-select.php:356

I'm not 100% sure how it was triggered, maybe by deleting a previously selected post, or maybe by saving an empty field, but I've fixed this by expanding the isset check to all used offsets in line 356:

$field['value'] = isset($field['value'], $field['value']['site_id'], $field['value']['post_id']) ? $field['value']['site_id'] . '|' . $field['value']['post_id'] : '';

Feel free to incorporate it.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions