Skip to content

Undefined variable: this #34

@designcise

Description

@designcise

Issue: Inside an application closure function, $this is undefined.

To Reproduce:

/// ...
$app->get('/', function (Request $request, Response $response) {
    echo nl2br(print_r($this, true)); // or try $temp = $this;
    return $response;
});

Expected Result: Should return an instance of the Hawkbit\Application object.

The same thing happens inside $app->group()


Note: Also on an unrelated note, this link in the docs leads to a 404 "http://container.thephpleague.com/service-providers/"

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions