phalcon-rest
phalcon-rest copied to clipboard
Error in Example
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.