We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent a12c5f7 commit 47d808cCopy full SHA for 47d808c
src/EtherpadLite/Response.php
@@ -20,8 +20,10 @@ public function __construct(\Guzzle\Http\Message\Response $response)
20
if ($response->isSuccessful()) {
21
$this->response = $response->json();
22
23
- foreach ($this->response as $key => $value) {
24
- $this->response[$key] = $value;
+ if (is_array($this->response)) {
+ foreach ($this->response as $key => $value) {
25
+ $this->response[$key] = $value;
26
+ }
27
}
28
} else {
29
// TODO: Error handling
@@ -61,4 +63,4 @@ public function getResponse()
61
63
{
62
64
return $this->response;
65
-}
66
+}
0 commit comments