Skip to content

Commit

Permalink
Prevent an exception when no Elasticsearch port provided (OrchardCMS#…
Browse files Browse the repository at this point in the history
  • Loading branch information
MikeAlhayek authored and urbanit committed Mar 18, 2024
1 parent d6a9cdd commit 14d0089
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -254,7 +254,7 @@ private static bool CheckOptions(ElasticConnectionOptions elasticConnectionOptio
optionsAreValid = false;
}

if (elasticConnectionOptions.Ports.Length == 0)
if (elasticConnectionOptions.Ports?.Length == 0)
{
logger.LogError("Elasticsearch is enabled but not active because a port is missing in application configuration.");
optionsAreValid = false;
Expand Down

0 comments on commit 14d0089

Please sign in to comment.