Skip to content

Error in Example #8

Description

@elia-c

When I run this request:
http://api.phalconrest.local/v1/example
I get the error:
Fatal error: Using $this when not in object context in /var/www/phalcon-rest/controllers/ExampleController.php on line 29

I found that the problem is in index.php line 196, by replacing this:
->setHandler('\PhalconRest\Controllers\ExampleController');
with this:
->setHandler(new \PhalconRest\Controllers\ExampleController());

all works well.

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