Skip to content

Commit 7d58d68

Browse files
authored
Add is_array check in IssueService::addAttachments
Add is_array check in \JiraRestApi\Issue\IssueService::addAttachments method
1 parent 074992b commit 7d58d68

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/Issue/IssueService.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -133,9 +133,10 @@ public function addAttachments($issueIdOrKey, $filePathArray)
133133

134134
$resArr = array();
135135
foreach ($results as $ret) {
136+
$ret = json_decode($ret);
136137
if (is_array($ret)) {
137138
array_push($resArr, $this->json_mapper->mapArray(
138-
json_decode($ret), new \ArrayObject(), '\JiraRestApi\Issue\Attachment'
139+
$ret, new \ArrayObject(), '\JiraRestApi\Issue\Attachment'
139140
)
140141
);
141142
}

0 commit comments

Comments
 (0)