Skip to content

PHP warning when $attachment_url is an array #10

@kara-todd

Description

@kara-todd

I'm not sure exactly why I'm running across this in my app... but I'm getting an array passed to _get_attachment_id_from_url rather than a string.

This is predictably throwing a warning strpos() expects parameter 1 to be string, array given acf-audio-video/acf-audio-video-field.php:380

I didn't hunt down the source of the error, but just checking that the passed variable $attachment_url is indeed a string resolves the warning for me.

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