Skip to content

Commit 392cefc

Browse files
author
Dan Richelson
committed
add better check for blank user key
1 parent cc81f8e commit 392cefc

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/LaunchDarkly/LDClient.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -223,7 +223,7 @@ public function identify($user) {
223223
* @return array()|null Mapping of feature flag keys to their evaluated results for $user
224224
*/
225225
public function allFlags($user) {
226-
if (is_null($user) || strlen($user->getKey()) === 0) {
226+
if (is_null($user) || is_null($user->getKey())) {
227227
$this->_logger->warn("allFlags called with null user or null/empty user key! Returning null");
228228
return null;
229229
}

0 commit comments

Comments
 (0)