Skip to content

Timber::get_calling_script_file backtrace doesn't necessarily reference a file #785

@gwagroves

Description

@gwagroves

https://github.com/jarednova/timber/blob/master/timber.php#L608

The if clause assumes that the file key exists, but file is only a possible key. (A callable is listed in the backtrace without file being set, causing an undefined index notice to be triggered.)

Solution: use array_key_exists.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions