Skip to content
This repository has been archived by the owner on Jan 8, 2020. It is now read-only.

Fixed error in adapter paginator DbTableGateway #4169

Closed

Conversation

moura137
Copy link
Contributor

@moura137 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

…ing added as the table name.

I added a third parameter to the ordination
$select = $tableGateway->getSql()->select($where);
$select = $tableGateway->getSql()->select();
if ($where) $select->where($where);
if ($order) $select->order($order);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

if ($where) {
    $select->where($where);
}

weierophinney added a commit that referenced this pull request Apr 12, 2013
- Conditionals require block format
weierophinney added a commit that referenced this pull request Apr 12, 2013
- per php-cs-fixer
weierophinney added a commit that referenced this pull request Apr 12, 2013
@ghost ghost assigned weierophinney Apr 12, 2013
@weierophinney
Copy link
Member

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

weierophinney added a commit to zendframework/zend-paginator that referenced this pull request May 15, 2015
- Conditionals require block format
weierophinney added a commit to zendframework/zend-paginator that referenced this pull request May 15, 2015
weierophinney added a commit to zendframework/zend-paginator that referenced this pull request May 15, 2015
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants