diff options
author | Joas Schilling <coding@schilljs.com> | 2020-11-16 16:49:01 +0300 |
---|---|---|
committer | Joas Schilling <coding@schilljs.com> | 2020-12-15 16:10:52 +0300 |
commit | 138221f0a882901f34ec884a503fae90804909e2 (patch) | |
tree | 2578251a04c10ec5c3a29ad446591c36cb2c73f3 /lib/Model | |
parent | fb0ee51bd95b37e2bd9ac1dc506942b04daeda32 (diff) |
Fix help command handling on Oracle
Signed-off-by: Joas Schilling <coding@schilljs.com>
Diffstat (limited to 'lib/Model')
-rw-r--r-- | lib/Model/CommandMapper.php | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/lib/Model/CommandMapper.php b/lib/Model/CommandMapper.php index 877ce8203..5142189a7 100644 --- a/lib/Model/CommandMapper.php +++ b/lib/Model/CommandMapper.php @@ -85,8 +85,13 @@ class CommandMapper extends QBMapper { $query = $this->db->getQueryBuilder(); $query->select('*') ->from($this->getTableName()) - ->where($query->expr()->eq('app', $query->createNamedParameter($app))) - ->andWhere($query->expr()->eq('command', $query->createNamedParameter($cmd))); + ->where($query->expr()->eq('command', $query->createNamedParameter($cmd))); + + if ($app === '') { + $query->andWhere($query->expr()->emptyString('app')); + } else { + $query->andWhere($query->expr()->eq('app', $query->createNamedParameter($app))); + } return $this->findEntity($query); } |