Skip to content

Commit 9023ea6

Browse files
committed
missing array key guard
1 parent 0f76969 commit 9023ea6

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/LaunchDarkly/FeatureFlagsState.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ public function isValid()
5858
*/
5959
public function getFlagValue($key)
6060
{
61-
return $this->_flagValues[$key];
61+
return isset($this->_flagValues[$key]) ? $this->_flagValues[$key] : null;
6262
}
6363

6464
/**

tests/MockFeatureRequester.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ public function __construct($baseurl, $key, $options)
1313

1414
public function getFeature($key)
1515
{
16-
return self::$flags[$key];
16+
return isset(self::$flags[$key]) ? self::$flags[$key] : null;
1717
}
1818

1919
public function getSegment($key)

0 commit comments

Comments
 (0)