We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 7f1e83e commit 8a280e4Copy full SHA for 8a280e4
src/Picqer/Carriers/SendCloud/Query/FindAll.php
@@ -25,11 +25,16 @@ public function collectionFromResult($result)
25
{
26
$collection = [];
27
28
- foreach ($result[$this->namespaces['plural']] as $r) {
29
- $collection[] = new self($this->connection(), $r);
+ $resultsContainer = $result;
+ if (isset($result[$this->namespaces['plural']])) {
30
+ $resultsContainer = $result[$this->namespaces['plural']];
31
+ }
32
+
33
+ foreach ($resultsContainer as $item) {
34
+ $collection[] = new self($this->connection(), $item);
35
}
36
37
return $collection;
38
39
-}
40
+}
0 commit comments