Skip to content

Commit 92db931

Browse files
authored
Merge pull request #2 from dauskonzept/1-bug-array_key_exists-argument-2-$array-must-be-of-type-array-string-given
[BUG] array_key_exists(): Argument #2 ($array) must be of type array, string given
2 parents f485439 + 9b55010 commit 92db931

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

Classes/Client/PersonioApiClient.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,10 +38,12 @@ public function fetchFeedItems(string $feedUrl): array
3838

3939
$contentString = simplexml_load_string($content, SimpleXMLElement::class, LIBXML_NOCDATA);
4040

41-
return json_decode(
41+
$return = json_decode(
4242
(string)json_encode($contentString),
4343
true
4444
)['position'];
45+
46+
return isset($return[0]) ? $return : [$return];
4547
}
4648

4749
return [];

0 commit comments

Comments
 (0)