Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error in Example #8

Open
elia-c opened this issue Oct 18, 2014 · 0 comments
Open

Error in Example #8

elia-c opened this issue Oct 18, 2014 · 0 comments

Comments

@elia-c
Copy link

elia-c commented Oct 18, 2014

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant