Skip to content

Commit 6a25c15

Browse files
committed
only return content if present
~this supports the new update on the REST API
1 parent fc475de commit 6a25c15

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

JotForm.php

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,11 @@ private function _executeHttpRequest($path, $params=array(), $method){
133133
curl_close($ch);
134134

135135
if ($this->outputType == "json") {
136-
return $result_obj["content"];
136+
if (isset($result_obj['content'])) {
137+
return $result_obj['content'];
138+
} else {
139+
return $result_obj;
140+
}
137141
} else {
138142
return $result_obj;
139143
}

0 commit comments

Comments
 (0)