fedecarg / apify-library

Apify is a small open source library that delivers new levels of developer productivity by simplifying the creation of RESTful architectures. It helps development teams deliver quality web services and applications in reduced amounts of time. If you are familiar with the Zend Framework, then you already know how to use Apify.
http://www.apifydoc.com
Other
266 stars 49 forks source link

Fetch error when loading /users or /users/1 examples #4

Closed christarczon closed 13 years ago

christarczon commented 13 years ago

I had to remove the $this->entity parameter in the setFetchMode method call to make it work for me. Running the latest WAMP with PHP 5.3.4

exception 'PDOException' with message 'SQLSTATE[HY000]: General error: fetch mode doesn't allow any extra arguments' in C:\wamp\apify\library\Model.php:136 Stack trace:

0 C:\wamp\apify\library\Model.php(136): PDOStatement->setFetchMode(1048581, 'User')

1 C:\wamp\apify\library\Model.php(200): Model->execute('SELECT * FROM `...', Array)

2 C:\wamp\apify\app\controllers\UsersController.php(27): Model->findAll()

3 C:\wamp\apify\library\Request.php(232): UsersController->indexAction(Object(Request))

4 C:\wamp\apify\public\index.php(8): Request->dispatch()

5 {main}

apifytech commented 13 years ago

Removed extra argument. Thanks.