Skip to content

Commit

Permalink
removed JSON_ESCAPE_SLASHES to support php-5.3
Browse files Browse the repository at this point in the history
  • Loading branch information
zircote committed Dec 8, 2013
1 parent c7e5935 commit 004fe14
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion library/Rhubarb/Message.php
Original file line number Diff line number Diff line change
Expand Up @@ -451,6 +451,6 @@ public function toArray()
public function __toString()
{
$message = $this->toArray();
return json_encode($message, JSON_UNESCAPED_SLASHES);
return json_encode($message);
}
}
4 changes: 2 additions & 2 deletions library/Rhubarb/Task.php
Original file line number Diff line number Diff line change
Expand Up @@ -583,7 +583,7 @@ public function toArray()
$encoding = ($this->getMessage()->getBodyEncoding() || $this->getMessage()->getContentEncoding());
switch ($encoding) {
case Rhubarb::CONTENT_ENCODING_BASE64:
$body = base64_encode(json_encode($body, JSON_UNESCAPED_SLASHES));
$body = base64_encode(json_encode($body));
break;
}
$this->getMessage()->setBody($body);
Expand All @@ -595,7 +595,7 @@ public function toArray()
*/
public function __toString()
{
$encodedJson = json_encode($this->toArray(), JSON_UNESCAPED_SLASHES);
$encodedJson = json_encode($this->toArray());
return (string)$encodedJson;
}

Expand Down

0 comments on commit 004fe14

Please sign in to comment.