Fixed error in adapter paginator DbTableGateway #4169

Closed
wants to merge 1 commit into
from

Projects

None yet

2 participants

@moura137
Contributor
moura137 commented Apr 2, 2013

Fixed error in paging adapter DbTableGateway because the condition was being added as the table name.

I added a third parameter to the ordination

@moura137 moura137 Fixed error in adapter paginator DbTableGateway, the condition was be…
…ing added as the table name.

I added a third parameter to the ordination
0ebf5ac
@weierophinney weierophinney commented on the diff Apr 12, 2013
library/Zend/Paginator/Adapter/DbTableGateway.php
{
- $select = $tableGateway->getSql()->select($where);
+ $select = $tableGateway->getSql()->select();
+ if ($where) $select->where($where);
+ if ($order) $select->order($order);
@weierophinney
weierophinney Apr 12, 2013 Member

Per the ZF coding standards, the two above lines need to be rewritten to use block form:

if ($where) {
    $select->where($where);
}
@weierophinney weierophinney added a commit that referenced this pull request Apr 12, 2013
@weierophinney weierophinney [#4169] CS fixes
- Conditionals require block format
e2e5fd7
@weierophinney weierophinney added a commit that referenced this pull request Apr 12, 2013
@weierophinney weierophinney [#4169] Additional CS fixes
- per php-cs-fixer
77fadf8
@weierophinney weierophinney added a commit that referenced this pull request Apr 12, 2013
@weierophinney weierophinney Merge branch 'hotfix/4169' into develop
Close #4169
56c4b83
@weierophinney
Member

I made the requested changes on merge -- thanks for the patch!

@weierophinney weierophinney added a commit to zendframework/zend-paginator that referenced this pull request May 15, 2015
@weierophinney weierophinney [zendframework/zendframework#4169] CS fixes
- Conditionals require block format
1ee159f
@weierophinney weierophinney added a commit to zendframework/zend-paginator that referenced this pull request May 15, 2015
@weierophinney weierophinney [zendframework/zendframework#4169] Additional CS fixes
- per php-cs-fixer
9e14aa0
@weierophinney weierophinney added a commit to zendframework/zend-paginator that referenced this pull request May 15, 2015
@weierophinney weierophinney Merge branch 'hotfix/4169' into develop 09f0424
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment