Skip to content
This repository was archived by the owner on Jun 27, 2018. It is now read-only.
This repository was archived by the owner on Jun 27, 2018. It is now read-only.

Capabilities check not working due to array_flip #27

@screambeard

Description

@screambeard

In the ToolProvider class a check is made on the capabilities.

Line 895 states the following:
if (!in_array($name, $capabilities) && !in_array($name, array_flip($capabilities))) {

However the use of array_flip in combination with == in line 895 causes every capability to pass, since string == 0 is true (see link)

Either remove the array_flip part, since I don't think it is needed.
Or make it a strong comparison: ===

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