Wednesday, August 25, 2010

sfDoctrinePager: Fatal error: Call to undefined method Doctrine_Collection::offset()

If you set a sfDoctrinePager object and give an EXECUTED query to the $this->pager->setQuery() method, you get a fatal error. Don't forget, sfDoctrinePager will execute the query, not you. Remove the ->execute() command from the end of the query.

Fatal error: Call to undefined method Doctrine_Collection::offset() in C:\webserv\www\phpcrm\lib\vendor\symfony\lib\plugins\sfDoctrinePlugin\lib\pager\sfDoctrinePager.class.php on line 84

7 comments:

  1. Thank you so much!!! I can leave the Excedrin in the closet this morning :)

    ReplyDelete
  2. thxxxxxxxxxxxxxx

    ReplyDelete
  3. thanks! you save my day

    ReplyDelete