Skip to content

Commit

Permalink
Fix InteractiveInteractor if elastic is disabled via environment vari…
Browse files Browse the repository at this point in the history
…able (#4)
  • Loading branch information
groensch24 authored Dec 9, 2021
1 parent 370e52a commit dee5713
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Interactor/AdaptiveInteractor.php
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ class AdaptiveInteractor implements ElasticApmInteractorInterface

public function __construct(ElasticApmInteractorInterface $real, ElasticApmInteractorInterface $fake)
{
$this->interactor = \extension_loaded('elastic_apm') ? $real : $fake;
$this->interactor = \extension_loaded('elastic_apm') && \class_exists('Elastic\\Apm\\ElasticApm') ? $real : $fake;
}

public function setTransactionName(string $name): bool
Expand Down

0 comments on commit dee5713

Please sign in to comment.