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

Commit

Permalink
Browse files Browse the repository at this point in the history
- Conditionals require block format
  • Loading branch information
weierophinney committed Apr 12, 2013
1 parent 74bf15a commit 1ee159f
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/Adapter/DbTableGateway.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,12 @@ class DbTableGateway extends DbSelect
public function __construct(TableGateway $tableGateway, $where = null, $order = null)
{
$select = $tableGateway->getSql()->select();
if ($where) $select->where($where);
if ($order) $select->order($order);
if ($where) {
$select->where($where);
}
if ($order) {
$select->order($order);
}

$dbAdapter = $tableGateway->getAdapter();
$resultSetPrototype = $tableGateway->getResultSetPrototype();
Expand Down

0 comments on commit 1ee159f

Please sign in to comment.