Warning: json_decode() expects parameter 1 to be string, array given
tiagobutzke opened this issue · 0 comments
tiagobutzke commented
Steps to reproduce
- Using
LDDFeatureRequestertry to fetch all flags by a user:
$client = new LDClient(
'...key',
['feature_requester_class' => 'LaunchDarkly\LDDFeatureRequester', ...]
);
$user = new LDUser(...);
$client->allFlags($user);Warning
Warning: json_decode() expects parameter 1 to be string, array given
Analysis
- Here it's using predis'
hgetall(). This method returns anarray; - Here the SDK is trying to decode
$raw, but$rawis anarraynot astring.
Propose
- Iterate the array and decode only it's rows;