Skip to content

Commit bbd3d90

Browse files
author
Alexandru Bucur
committed
clone reference to the response object
1 parent 4b6d6f0 commit bbd3d90

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/MessageBird/Resources/Base.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -186,7 +186,8 @@ public function getList(?array $parameters = [])
186186

187187
foreach ($items as $item) {
188188
if ($this->responseObject) {
189-
$baseList->items[] = $this->responseObject->loadFromStdclass($item);
189+
$responseObject = clone $this->responseObject;
190+
$baseList->items[] = $responseObject->loadFromStdclass($item);
190191
} else {
191192
/** @psalm-suppress UndefinedClass */
192193
$object = new $objectName($this->httpClient);

0 commit comments

Comments
 (0)