Skip to content

Dependencies must be an array #37

@Camwyn

Description

@Camwyn

When we set_dependencies() we take a string or callable in the case of a string, we set $this->dependencies to what we are passed.

When we get_dependencies(), we insist we are returning an array but if we have set $this->dependencies to a string this will throw an Uncaught TypeError. The string then gets passed directly to wp_register_script which also expects an array and throws an error.

We've had one customer report of this recently

I'd suggest just casting to an array in the return, but am open to suggestions from wiser heads than mine.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions