diff --git a/apps/webhook_listeners/lib/Db/WebhookListenerMapper.php b/apps/webhook_listeners/lib/Db/WebhookListenerMapper.php index 75456cc0b7555..617f38906cc39 100644 --- a/apps/webhook_listeners/lib/Db/WebhookListenerMapper.php +++ b/apps/webhook_listeners/lib/Db/WebhookListenerMapper.php @@ -227,14 +227,13 @@ public function getByEvent(string $event, ?string $userId = null): array { ->from($this->getTableName()) ->where($qb->expr()->eq('event', $qb->createNamedParameter($event, IQueryBuilder::PARAM_STR))); - if ($userId === '' || $userId === null) { $qb->andWhere($qb->expr()->emptyString('user_id_filter')); } else { $qb->andWhere( $qb->expr()->orX( $qb->expr()->emptyString('user_id_filter'), - $qb->expr()->eq('user_id_filter', $qb->createNamedParameter($userId)), + $qb->expr()->eq('user_id_filter', $qb->createNamedParameter($userId, IQueryBuilder::PARAM_STR)) ) ); }