ZF2-416: Call to undefined method Zend\Db\Sql\Select::__toString() In Paginator\Adaptor\DbSelect

Issue Type: Bug Created: 2012-07-22T23:54:01.000+0000 Last Updated: 2012-08-27T20:13:33.000+0000 Status: Resolved Fix version(s): Reporter: Thomas R. (thomas_r) Assignee: Ralph Schindler (ralph) Tags: - Zend\Db

  • Zend\Paginator
  • db
  • dbselect
  • paginator

Related issues: - ZF2-246



During an experiment with the paginator adapters from master, I came across an issue resulting in the following error: Fatal error: Call to undefined method Zend\Db\Sql\Select::__toString() in /var/www/zf/ZendSkeletonApplication/vendor/ZF2/library/Zend/Paginator/Adapter/DbSelect.php on line 154

My Sample code: $dbAdapter = new \Zend\Db\Adapter\Adapter( array( 'driver' => 'Pdo_Sqlite', 'database' => DIR . '/../../../posts.db3' ) );

        $sql = new \Zend\Db\Sql\Sql($dbAdapter);
        $select = $sql->select()->from('posts');

        $paginatorAdapter = new \Zend\Paginator\Adapter\DbSelect($select);

        $p = new \Zend\Paginator\Paginator($paginatorAdapter);
        $p->setItemCountPerPage(self::PER_PAGE);    // this line causes the error below


Posted by Ralph Schindler (ralph) on 2012-08-27T20:13:33.000+0000

This was resolved in rc4.

Have you found an issue?

See the Overview section for more details.


© 2006-2018 by Zend, a Rogue Wave Company. Made with by awesome contributors.

This website is built using zend-expressive and it runs on PHP 7.