diff --git a/app/config/errors.php b/app/config/errors.php index f880ed9a02..40f6ad018f 100644 --- a/app/config/errors.php +++ b/app/config/errors.php @@ -923,7 +923,7 @@ return [ /** Targets */ Exception::TARGET_PROVIDER_INVALID_TYPE => [ - 'name' => Exception::PROVIDER_INVALID_TYPE, + 'name' => Exception::TARGET_PROVIDER_INVALID_TYPE, 'description' => 'Target has an invalid provider type.', 'code' => 400, ], diff --git a/app/controllers/api/messaging.php b/app/controllers/api/messaging.php index 501c724127..8e6c73f3bc 100644 --- a/app/controllers/api/messaging.php +++ b/app/controllers/api/messaging.php @@ -2323,7 +2323,7 @@ App::get('/v1/messaging/topics/:topicId/subscribers') throw new Exception(Exception::TOPIC_NOT_FOUND); } - \array_push($queries, Query::equal('topicInternalId', [$topic->getInternalId()])); + $queries[] = Query::equal('topicInternalId', [$topic->getInternalId()]); /** * Get cursor document if there was a cursor query, we use array_filter and reset for reference $cursor to $queries