Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions src/Optimizely/DecisionService/DecisionService.php
Original file line number Diff line number Diff line change
Expand Up @@ -510,7 +510,7 @@ public function getForcedVariation(ProjectConfigInterface $projectConfig, $exper
$experimentId = $projectConfig->getExperimentFromKey($experimentKey)->getId();

// check for null and empty string experiment ID
if (strlen($experimentId) == 0) {
if (strlen((string)$experimentId) == 0) {
// this case is logged in getExperimentFromKey
return [ null, $decideReasons];
}
Expand Down Expand Up @@ -554,7 +554,7 @@ public function setForcedVariation(ProjectConfigInterface $projectConfig, $exper
$experimentId = $experiment->getId();

// check if the experiment exists in the datafile (a new experiment is returned if it is not in the datafile)
if (strlen($experimentId) == 0) {
if (strlen((string)$experimentId) == 0) {
// this case is logged in getExperimentFromKey
return false;
}
Expand All @@ -570,7 +570,7 @@ public function setForcedVariation(ProjectConfigInterface $projectConfig, $exper
$variationId = $variation->getId();

// check if the variation exists in the datafile (a new variation is returned if it is not in the datafile)
if (strlen($variationId) == 0) {
if (strlen((string)$variationId) == 0) {
// this case is logged in getVariationFromKey
return false;
}
Expand Down