Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions Trustly/Api/api.php
Original file line number Diff line number Diff line change
Expand Up @@ -473,6 +473,9 @@ public function call($request) {
$this->last_request = $request;

$jsonstr = $request->json();
if($jsonstr === FALSE) {
throw new Trustly_DataException('Unable to json encode payload');
}

$url = $this->url($request);
list($body, $response_code) = $this->post($url, $jsonstr);
Expand Down
2 changes: 1 addition & 1 deletion Trustly/Data/data.php
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@ public function pop($name) {
* @param boolean $pretty Format the output in a prettified easy-to-read
* formatting
*
* @return string The current payload in JSON
* @return string|false The current payload in JSON
*/
public function json($pretty=FALSE) {
if($pretty) {
Expand Down